View Full Version : Woohoo! sendmail+cyrus+MailScanner+spamass-milter working!
wizard
12th June 2004, 12:58 AM
Finally got all the mail functions back that I had *before* upgrading to FC2 ;)
spamassassin was the one I did the most headscratching over - and then I found the most excellent spamass-milter in Dag Wieers' repository.
I installed the milter, added
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass.sock, F=,T=C:15m;S:4m;R:4m;E:10m')dnl
to sendmail.mc, ran
make -C /etc/mail
restarted sendmail, spamassassin and spamass-milter just for grins and am now happily filtering mail through spamd again. Life is good.
:)
GiLuX
25th June 2004, 03:29 AM
that's really great!
i can't wait untill your tutorial gets published on this site ;)
(you are working on it right now aren't you?)
wizard
25th June 2004, 04:13 AM
that's really great!
i can't wait untill your tutorial gets published on this site ;)
(you are working on it right now aren't you?)
;)
Actually I ended up ditching MailScanner for clamav-milter. Much better performance - at least on my machine.
Here's the tutorial :D
1. Get sendmail working with cyrus.
2. Install spamassassin and spamass-milter.
3. Install clamav and clamav-milter.
4. Add the following two lines to /etc/mail/sendmail.mc (check paths to the sockets - these worked on my server):
INPUT_MAIL_FILTER(`clamav', `S=local:/var/clamav/clmilter.socket, T=S:4m;R:4m')dnl
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass.sock, F=,T=C:15m;S:4m;R:4m;E:10m')dnl
5. From a terminal session, issue 'make -C /etc/mail'
6. Insure sendmail has permission to talk to the sockets. This wasn't a problem in FC2 for me.
7. Make sure ScanMail is uncommented in /etc/clamav.conf
8. Start clamav, clamav-milter and spamd.
9. Restart sendmail.
Note: My setup will still pass mail if clamav-milter fails - you may not want this. If you want to bounce mail if clamav-milter fails use this line in sendmail.mc instead:
INPUT_MAIL_FILTER(`clamav', `S=local:/var/clamav/clmilter.socket, F=T, T=S:4m;R:4m')dnl
enjoy!
wizard
25th June 2004, 04:43 AM
And here's a mail header that shows it all working. I rewrite subject lines with spamassassin and then use a client filter to move the mail to a spam folder :)
Return-Path: <mail@damn_spammer.com>
Received: from mail.myserver.com ([unix socket])
by myserver.com (Cyrus v2.2.3-Red Hat 2.2.3-11) with LMTP; Thu, 24 Jun 2004 11:27:10 -0400
X-Sieve: CMU Sieve 2.2
Received: from mx2.regaachieve.com (mx2.regaachieve.com [69.42.133.200] (may be forged))
by mail.myserver.com (8.12.11/8.12.11) with SMTP id i5OFQNSD020616
for <wizard@myserver.com>; Thu, 24 Jun 2004 11:26:54 -0400
To: wizard@myserver.com
Date: Thu, 24 Jun 2004 11:24:21 -0800
Message-ID: <1088101461.220@mx2.regaachieve.com>
X-Mailer: Mozilla 4.75 [de] (WinNT; U)
From: "Online Life" <mail@damn_spammer.com>
Subject: ***spam*** spam count=14.43 Save on LifeInsurance
Content-type: multipart/mixed; boundary="----------=_40DAF2CE.D7A33D67"
X-Virus-Scanned: clamd / ClamAV version 0.73, clamav-milter version 0.73a
on 127.0.0.1
X-Virus-Status: Clean
X-Spam-Flag: YES
X-Spam-Status: Yes, hits=14.4 required=5.0 tests=EMAIL_ROT13,
FORGED_MUA_MOZILLA,HTML_60_70,HTML_FONTCOLOR_BLUE, HTML_IMAGE_ONLY_10,
HTML_MESSAGE,MIME_HEADER_CTYPE_ONLY,MIME_HTML_NO_C HARSET,
MIME_HTML_ONLY,SAVE_ON_INSURANCE,YOUR_INCOME autolearn=no version=2.63
X-Spam-Level: **************
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on myserver.com
blammo
26th June 2004, 06:12 AM
Hey Wizard, thanks for the little tutorial. I got this setup working also except that the subject line of the spam email doesn't get re-written as such. Spamassassin recognizes the spam and inserts the X-Spam headers, but it won't insert ***spam*** into the subject line. I'm thinking that I got to add something to the trusted users section of sendmail. Got any ideas? Thanks.
wizard
26th June 2004, 06:33 AM
Hi, blammo -
In this instance rewriting headers is a function of spamassassin, not sendmail ;)
Here's the relevant part of my /etc/mail/spamassassin/local.cfrewrite_subject 1
subject_tag ***spam*** spam count=_HITS_You'll need to restart spamassassin for this to take effect, I think.
Hope this helps -
blammo
26th June 2004, 09:59 AM
Thanks wizard! I found the problem to be in the startup script for spamass-milter. Apparently there is a -m arg that disables subject rewriting. Removed this little puppy from the startup script, and now it's happily rewriting the subject line. Powerful setup here! Thanks again.
wizard
26th June 2004, 10:10 AM
Damn. I forgot about that :)
Thanks for pointing it out, blammo - enjoy the new mail toys :D
bsodmike
26th December 2004, 05:47 PM
How do you get sendmail to forward mail to cyrus ???
update: I figured this out and finished the article (http://www.bsodmike.com/articles/sendmail&cyrus.php) covering this topic.
Thanks :)
treborr
27th December 2004, 03:18 PM
Hi I am new user in fedora server, I read carefully this forum and the forum starts with using mailscanner. Then is used clamav-milter and spamass-milter.
I found webpage mailwatch for mailscanner, it seems the mailwatch is good staff.
It is possible to find something similar for the second solution with clamav-milter a spamass-mitler?
Thanks
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.