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

Installing a mail server on Red Hat Enterprise Linux 4

I had previously set up an email server using the same components, but on Red Hat Linux 7.3. It has run flawlessly for nearly 4 years, undergoing only minor updates, but the time had come to switch to a faster server with more storage.
For this new setup, I've now used Red Hat Enterprise Linux 4, but with many updated and custom packages.

The chosen components :

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

Postfix configuration :

Dovecot configuration :

Spamassassin configuration :

Nothing is required to have spamassassin operational, just enable and run the "spampd" service. You can configure the behaviour by editing the usual "/etc/mail/spamassassin/local.cf" file. Note that you do not need to run the basic spamd, and that you can use "sa-learn" as the "spampd" user in order to teach your local installation what is spam and what is ham.

Clam Antivirus configuration :

Enable and run both the "clamsmtp" and "clamd.smtp" services. Everything should be properly pre-configured. For the automatic virus definitions update, you'll need to comment out the "Example" line from "/etc/freshclam.conf".

OpenLDAP configuration :

This is probably the most lengthy part of the setup if you're not familiar with LDAP in general. I wasn't initially, and spent a lot of time figuring things outthe first time, 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 phpldapadmin with a custom template.

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 Enterprise 4, all the software mentioned above and all its dependencies can be found in the testing section (please let me know if any dependencies are missing).

Here are the packages used at time of initial writing (November 2006) :