Proper way to hook spamassassin into sendmail
I've got spamassassin installed, and spamd running... but it doesn't do anything. My sendmail recieves mail, but does not use spamc as a filter. I found some general rules at: http://www.uk-dave.com/tutorials/linux/spamassassin.shtml But, the SuSE spamassassin/spamc doesn't hook in that way, I get /var/log/mail errors like: Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/sendmail/spamass.sock Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): to error state This is true using spamassassin or spamc. What's the proper filter to hook into sendmail? Thanks, Chris
On Friday 24 September 2004 09:34 pm, Chris Worley wrote:
I've got spamassassin installed, and spamd running... but it doesn't do anything.
My sendmail recieves mail, but does not use spamc as a filter.
I found some general rules at:
http://www.uk-dave.com/tutorials/linux/spamassassin.shtml
But, the SuSE spamassassin/spamc doesn't hook in that way, I get /var/log/mail errors like:
Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/sendmail/spamass.sock Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): to error state
This is true using spamassassin or spamc.
What's the proper filter to hook into sendmail?
procmail A sample procmailrc: DROPPRIVS=yes # SpamAssassin sample procmailrc :0fw * < 256000 | spamc :0 H * ! ^From[ ] * ^rom[ ] { LOG="*** Dropped F off From_ header! Fixing up. " :0 fhw | sed -e 's/^rom /From /' } :0e { EXITCODE=$? } :0 * ^X-Spam-Status:.*hits=[1-9][0-9] { :0 /dev/null } -- _____________________________________ John Andersen
That worked. Thanks. Chris On Sat, 2004-09-25 at 03:12, John Andersen wrote:
On Friday 24 September 2004 09:34 pm, Chris Worley wrote:
I've got spamassassin installed, and spamd running... but it doesn't do anything.
My sendmail recieves mail, but does not use spamc as a filter.
I found some general rules at:
http://www.uk-dave.com/tutorials/linux/spamassassin.shtml
But, the SuSE spamassassin/spamc doesn't hook in that way, I get /var/log/mail errors like:
Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/sendmail/spamass.sock Sep 24 23:09:07 xserver sendmail[10106]: i8P597ct010106: Milter (spamassassin): to error state
This is true using spamassassin or spamc.
What's the proper filter to hook into sendmail?
procmail
A sample procmailrc: DROPPRIVS=yes # SpamAssassin sample procmailrc :0fw * < 256000 | spamc
:0 H * ! ^From[ ] * ^rom[ ] { LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw | sed -e 's/^rom /From /' }
:0e { EXITCODE=$? }
:0 * ^X-Spam-Status:.*hits=[1-9][0-9] {
:0 /dev/null }
On Saturday 25 September 2004 09:12 am, Chris Worley wrote:
On Sat, 2004-09-25 at 03:12, John Andersen wrote:
On Friday 24 September 2004 09:34 pm, Chris Worley wrote:
What's the proper filter to hook into sendmail?
procmail
A sample procmailrc: DROPPRIVS=yes # SpamAssassin sample procmailrc
:0fw
* < 256000
| spamc | :0 H
* ! ^From[ ] * ^rom[ ] { LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw : | sed -e 's/^rom /From /'
}
:0e
{ EXITCODE=$? }
----cut here
:0
* ^X-Spam-Status:.*hits=[1-9][0-9] {
:0
/dev/null }
That worked. Thanks.
Chris
I should warn you, the example I posted dumps any thing with a spam score > 10 directly to /dev/nul You might want to get rid of all in that script after the Cut here line above. -- _____________________________________ John Andersen
participants (2)
-
Chris Worley
-
John Andersen