[home] [packages] [docs] [apt] [links] [mirrors] [lists] [misc] [about]

Installing a mail server on Red Hat Linux 7.3

I wanted to have a complete full-featured mail server which would be easy to manage through LDAP using directory administrator (a nice gtk+ application). I chose postfix over sendmail for its ease of integration and bad memories of milter, chose dovecot over courier or cyrus because it looked much closer to the little requirements I had, and amavisd-new over mailscanner because I had already installed mailscanner once and... just wanted to see what else was available. It turns out the mix works quite well.

The chosen components :

Too much theory? Not enough eye candy? Take a peek at the screenshot!!

Postfix configuration :

SASL configuration (for SMTP AUTH) :

As the only way to do SMTP AUTH with postfix is through sasl and that sasl has no way of using LDAP directly, I had to configure sasl to use pam then have pam use LDAP... quite a complex setup for such a simple task, but I couldn't think of a better solution.

Dovecot configuration :

Spamassassin configuration :

As spamassassin is used by amavisd-new directly through its perl module, you don't need to do anything outside of /etc/amavisd.conf to get it working. No need to start spamd or edit spamassassin's configuration files.

Clam Antivirus configuration :

Nothing much to change. The defaults suited me, there were just some ownerships that needed to be changed to "amavis" in order for both to be able to interoperate.

AMaViSd-new configuration :

There is much to configure here, and optimal settings are probably very different from one site to another. Nevertheless I'll detail the changes I've made to suit my own needs. The whole file is pretty well commented, so do take the time to read it to understand all the possibilities amavisd-new has to offer.

OpenLDAP configuration :

This is probably the most lengthy part of the setup if you're not familiar with LDAP in general. I wasn't, and spent a lot of time figuring things out, as the whole LDAP protocol and the OpenLDAP implementation are quite rough around the edges, or at least I think so.

I won't detail my schema here, it's pretty standard, and can easily be guessed from the entries used all along. To add users to the database, I use directory_administrator. It doesn't do all that I'd like it to, it can't help for the initial setup, but it's still quite useful on a daily basis. It's worth mentionning also that despite having tried hard, I was unable to get TLS working.

The end!

I hope this will have been useful. Please do not contact me directly for help, use mailing-lists instead, but do let me know if you see any mistakes or possible improvements to the document or the setup itself.

Last of all... for Red Hat Linux 7.3, all the software mentioned above and all its dependencies (this includes quite a lot of perl modules for amavisd-new for instance) can be found in the testing section.

Here are the packages used at time of initial writing (July 2003) :

Update (Wed 3 Sep 2003) :