From: "Ed Russell" <[EMAIL PROTECTED]>

If everyone would indulge me I would like to put forth the setup I am
utilizing and get some feedback.   I have a box that I have been using for
some time which acts as a pass-through filter for many domains (currently
about 100) for spam, this is a fairly high traffic server processing about
150,000 to 200,000 messages per day.  I use the following method.

Based upon a redhat 6.2 box running kernel 2.2.26, PIV with 2 Gigs of RAM.

Qmail runs which accepts the email from the world (with a
concurrencyincoming of 100) and passes it through qmail-scanner (which calls
spamd) and spamassassin which checks the email and writes spam status to the
header.  Each message gets then passed through a procmail filter which will
delete it if it is spam.  The procmail filter is:

I note the other answers and thought I'd comment because the above
description of your mail topology raised the hairs on the back of my
neck. (And that takes doing considering their length. {^_-})

First I not you say Qmail (it's own punishment) feets qmail-scanner.
The qmail-scanner calls spamd? Naw, can't DO that. AND it calls
spamassassin? That's even stranger. But then it goes to procmail for
the delivery.

My topology is somewhat different but useful. If you are using qmail-scanner
only to make the spamassassin run and the procmail run then jettison it
and go to procmail directly. That MAY reduce the machine load a little.
Also make sure spamd is running, exactly once, from your /etc/init.d
files or the equivalent on BSDs. You'd then use spamc to get to the
SpamAssassin run. You show some data below. (I am not sure what the
EXITCODE is supposed to do for you. I never set it here. But that may
be because I use procmail alone. It exits and mail is "delivered" either
to a diversion directory, /dev/null, or the user's mailbox.)

Anyway, you can call spamc from inside procmail this way:

:0
* < 500000
* !^List-Id: .*(spamassassin\.apache.\org)
| /usr/bin/spamc -t 150 -u $USER

:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
{
       EXITCODE=99
       :0
       /dev/null
}

:0
* ^X-Spam-Status: Yes
{
       EXITCODE=99
       :0
       /dev/null
}

:0
* ^^rom[ ]
{
 LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
 | sed -e '1s/^/F/'
}

:0
/dev/null

Mail that is clean gets passed off to a second qmail install which then
delivers the mail to our servers using smtproutes.

Ouch. And what is that final redirect of EVERYTHING to /dev/null? I just
let procmail deliver it.

{o.o}

Reply via email to