How to setup a mailserver with Exim4 and DBMail on a Debian 7 VPS

In this article we will walk you through the steps on how to setup a mailserver with Exim4 and DBMail on a Debian 7 (Wheezy) Linux VPS.

What is Exim4?

It is a mail transfer agent (MTA) used on Unix-like operating systems which is responsible for receiving, routing, and delivering e-mail messages.

What is DBMail?

It is fast and scalable sql based email service which stores email messages in a relational database. It supports multiple front-ends like IMAP4, POP3, ManageSieve, LMTP etc. and multiple back-ends like MySQL, PostgreSQL, Oracle and SQLite.

CONFIGURE DBMAIL

do not forget to replace DATABASE_PASSWORD with the actual password you used when you created the database

Next, edit /etc/default/dbmail and set the following:

## vim /etc/default/dbmail
START_IMAPD=true
START_LMTPD=true

RESTART DBMAIL SERVICE

With DBMail’s configuration in place, proceed with starting up the service using:

## service dbmail restart

ADD DBMAIL TO SYSTEM STARTUP

Add DBMail service to your Debain VPS startup so that the service is automatically started when you reboot your server:

## update-rc.d -f dbmail enable

CONFIGURE EXIM

Next, you have to appropriately configure Exim with DBMail. This includes setting up user database lookups, authentication, routing and transport. First setup Exim main configuration file and continue with user lookups, so:

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Exim with DBMail. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.