Posted in Howto Linux Postfix

SpamAssassin + DCC on CentOS/RHEL

March 5, 2007 - 2 comments

I decided to give a try to DCC on our CentOS 3.8 mail gateway running Postfix.

SpamAssassin 3.1.8 was already installed.

Install package :
rpm -ihv http://repo.securityteam.us/repository/redhat/el3/i386/RPMS/dcc-1.3.12-1.i386.rpm

In order to work properly, DCC needs the following iptables rule :
iptables -A INPUT -p udp -m udp --dport 1024:65535 --sport 6277 -j ACCEPT

Edit /etc/dcc/dcc_conf and enable dccifd :
DCCIFD_ENABLE=on

Edit /etc/mail/spamassassin/local.cf :
use_dcc 1
dcc_home /etc/dcc

Edit /etc/mail/spamassassin/v310.pre :
loadplugin Mail::SpamAssassin::Plugin::DCC
dcc_path /usr/bin/dccproc

Restart SpamAssassin :
service spamassassin restart

Test and debug SpamAssassin and see if anything goes wrong with DCC :
spamassassin -t -D < /usr/share/doc/spamassassin-3.1.8/sample-spam.txt

Output (snippet), see DCC check works :
Content analysis details: (1001.4 points, 3.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 NO_RELAYS Informational: message was not relayed via SMTP
1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email
1.4 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/)
-0.0 NO_RECEIVED Informational: message has no Received headers

Comments

Pete G

May 9, 2010 - 10:35

I hate you!
I spent two hours reading the DCC site info.
I’m tired! I’m sick!. I just had surgery! I’m half inebriated.
Had two mixed drinks. Have not had alcohol in years.
It helps the pain medication work a little faster and I refuse to take more
of the damned narcotics. I know I know, drugs are drugs alcohol is a drug and they don’t go together.
My better half is a 30 year medical pro and makes me behave.
At least alcohol isn’t an insecticide, “Nicotine is!” I do not and have not ever used the insecticide! NEVER!
Anyway I hate you for making it so easy after all that stress.
Had I started the right way I’d be asleep now instead of setting here hating you.
I googled “centos” dcc howto and copied your instructions, all except for the version number and it worked first time.
Did I learn anything from all the reading yes. Did I get enough to attempt the install? NO! You’re version was so clean and understandable I just went with it and it works.
OK so I don’t hate you!

Thanks,
Pete Gandy
Data-Technologies.net
Cleveland, TX

Seb

May 9, 2010 - 23:05

Well, glad you can have some rest now :-)
Glad this helped !

Leave Comment

Please consider visiting the partners below if you enjoyed this article :

If this post saved you time and money, please consider checking my Amazon wishlist.

Before submitting, some rules :
- Is your comment related to the article ?
- You're having a problem ? Have you checked Google, other howtos, docs, manpages ?
- You're still having the problem ? Have you raised log verbosity, checked traces, ran tcpdump ?
- Have you checked your configuratoin for typo ?
Unless your comment is providing additional info or respect the rules above, DON'T comment.
If you don't understand what you are doing, I urge you to read the documentation, I'm not your free Level 1 helpdesk guy.