Friday, May 30, 2008

Very Basic Mail Server setup with Postfix + Dovedot

This is just a very basic overview on setting up a MailServer with Postfix + Dovecot. I'm basing this on a Redhat flavored GNU/Linux, but this should work on other GNU/Linux's as well.

1. Install postfix and dovecot ( ex. if using yum, yum install postfix )

2. Go in to /etc/postfix dirtectory and re-name the to or something similar.

3. Create an empty

myhostname =
mydomain =
myorigin = $mydomain
mydestination =,, localhost, localhost.localdomain

inet_interfaces = all
mynetworks =

local_recipient_maps = unix:passwd.byname, $alias_maps

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = reject_rbl_client,

4. Add/Change the below lines in /etc/dovecot.conf

protocols = pop3
pop3_listen = *

5. Make sure your /etc/sysconfig/network has the correct FQDN


6. Make sure your /etc/hosts is correct. localhost.localdomain localhost
interface_ip mail

7. Do chkconfig service_name on for services postfix, dovecot and saslauthd and start the services with the service service_name start command.

8. Create the necessary user accounts with useradd command and assign passwords, and configure your mail clients to use the server for incoming(POP3) and outgoing(SMTP) with authentication.

ex: useradd -s /sbin/nologin username
ex: passwd username

Thats it.

You should be good to go..of course you have to have the necessary DNS settings and other changes, depending on your setup ( ex: firewall ), but for the Mail Server configuration, this is pretty much it.

Please keep in mind, that this is a very basic setup, and i have not tested the configuration above. This is just in case someone wants to get an idea. There are so many good guides on the net in setting up postfix, just search around for a while and you will see. If you need any help, there is always helpful #postfix on freenode. But please examine the situation well before asking for help, so they can help you better.

Other than that, put a comment or reach me at yajith at gmail dot com ( I will help you ( or at least try ) with my limited knowledge.

No comments: