Don't know if HOWTOs are allowed here, but I thought I'd share in case anyone else is having issues setting up a reasonably bulletproof mail setup - mods can feel free to delete this if I've crossed a line - but I've migrated a lot of the stuff I've learned from the Fedora project here and wrote a simple guide on getting mail working -

We've added a virus scanner, spam control, greylisting and three DNS blacklists to sendmail's configuration. This stuff ought to reduce your spam by about 90%. The only one that's not self-explanatory is milter-greylist. Greylisting temporarily rejects email, assuming that real mail servers will resend the message to you but spam servers will not. Out of the box milter-greylist will accept a resent email after 30 minutes. It means you'll get email a little later, but you can whitelist anyone you like. Works pretty well

First, I highly recommend adding the Misc and Extras repo at http://centos.karan.org - you'll need them for some of this. Just save the two .repo files to /etc/yum.repos.d - if you use yum extender you'll have to enable them in your profile as well - but we'll do all this from the command line.

Here we go - first we install a pile of software. Leave out anything you've already got installed -

Next, we want to make sure sendmail will relay mail from machines on our local subnet - we do that by editing /etc/mail/access - I added the following lines to the file

192.168.1 RELAYmy.wan.ip.address RELAY

Both may not be necessary but I added both of them anyway. It works

Then, rebuild the access database by doing -

cd /etc/mail

makemap hash access.db < access

Okay, now let's fix dovecot. Open /etc/dovecot.conf and change

protocols = imap imaps

to

protocols = imap imaps pop3 pop3s

Next, let's get the virus scanner going. Open /etc/freshclam.conf and look for this:

Comment or remove the line below.Example

Change it to this:

Comment or remove the line below.#Example

You'll have to do the same thing with /etc/clamav.conf - as clamav won't run or update without the example lines commented out. I think that's because they want someone to actually look at the configuration files

milter-greylist doesn't need a whole lot of configuring unless you want to whitelist some folks or domains out of the box - you'll find the configuration file at /etc/mail/greylist.conf

On to spamassassin...

There's an excellent (but basic) configuration generator for spamassassin at

and you can use that info to edit the real spamassassin config file at /etc/mail/spamassassin/local.cf

If you want to play with spamass-milter's configuration you'll find it at /etc/sysconfig/spamass-milter. Notice that all the flags in the file are commented out - be particularly careful of the -m flag. If you uncomment the line the -m flag will disable spamassassin subject rewriting. If you're using spamassassin to rewrite subject lines you'll want to take that -m out. I leave the -r 15 at the default. This will tell spamass-milter to reject any email with a spam score of 15 or higher. You can adjust this to your taste.

Okay. We're all done. If you're lazy like me you can reboot the machine and everything will come up now. If you're a bit more industrious or don't want to reboot the machine you can start all the services like this -

That bullet proof tutorial rocked! I took your tuorial and a few others and wrote a whoel article on the subject that includes SMTP AUTH and also automatic learning for the bayesian filters. You can find it at:Securing Your Sendmail Server

Why would anyone bother with this type of setup when you can have a mailserver up and running in about 1 hour with amavis, spamassassin, dpsam, mysql, tomcat etc. etc. - just try using Zimbra It's extremely easy to set-up and save the hassle of trying to integrate multiple packages.

I was a complete novice with Linux (I still am) and I managed to do it real easy, I've posted the link before but for posterity here it is again - www.zimbra.com Two versions available a paid-for version and for cheapskates like me an Open Source version with all the features you'd need.

phoenix wrote:Why would anyone bother with this type of setup when you can have a mailserver up and running in about 1 hourwith amavis, spamassassin, dpsam, mysql, tomcat etc. etc. - just try using Zimbra

Any package that 'integrates' MySQL is asking for RAM, CPU, time and dependenciesmany people don't feel like having.Why would anyone use MySQL for mail-integration, even? The monstrosityof using separate databases when it's all just lines of text we have to parse!Flatfile would do just fine.

I say: Postfix, dovecot, clamd, clamsmtp with decent config will do just fine.Amavis and Spamassassin are monsters, both administrative and memory/cpu-wise.

By the way, why is this forum running on such a strange UI?punBB or phpBB are still so much better.