Matt,

Thanks for the prompt reply. Indeed you ask a very good question. No the size of the message seems to not matter. When I turn on the expanded logging I can see that the message is in fact "assigned" to the spamc process.

Other ideas?

Pete



Matt Kettler wrote:

Question,

Are the "failed" messages > 256000 bytes in size?

If so, you procmail rules are bypassing the calls to spamc. Hence you see the
"first pass" message, but never a pass/fail message afterwards.


# send mail through spamassassin
DROPPRIVS=yes
LOG="FIRST PASS THROUGH SPAMC
"
:0fw
* < 256000
|/usr/bin/spamc

LOG="`/bin/date`  FIRST PASS COMPLETED
"
# Try a second time if SpamAssassin failed
#  this time, wait a random amount of time before starting
LOG="CHECKING IF SPAMC COMPLETED
"
:0fw
* ! ^X-Spam-Level:.*
* < 256000
{
LOG="`/bin/date` **** SPAMC FAILED.  RETRYING ****
"
# Here we will sleep at least 15 second but less than 30 seconds
# then attempt to run spamc again
| sleep $(perl -le 'srand($$);print int(rand()*15)+15'); /usr/bin/spamc
LOG="`bin/date`  BACK FROM SECOND ATTEMPT AT SPAMC
"
}

# Mail with score of 15 or higher as almost certainly spam
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/var/spool/mail/spam_15_points_or_more

# Work around procmail bug: any output on stderr will cause the
# "F" in "From" to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header!  Fixing up. "

:0 fhw
| sed -e 'ls/^/F/'
}

# each user's procmail rc calls a custom rc.spam that files spam in
their own
# spam file under /var/spool/mail


<snip>
*******************************************************
example of log when things are NOT working:
#######&&&&&&&& NEW MESSAGE &&&&&&&&&&#########
Wed Nov  9 01:06:05 MST 2005  *** going to vsnag.rc
Wed Nov  9 01:06:05 MST 2005  **** back from vsnag.rc
Wed Nov  9 01:06:05 MST 2005  ***** back from npd.rc
Wed Nov  9 01:06:05 MST 2005  CALLING RC.SPAM
FIRST PASS THROUGH SPAMC

*******************************************************
as you can see, when things are not working, the mail goes to spamc but
never comes out of the process.  (never gets to LOG="FIRST PASS COMPLETED")
mail does however drop through to email box with no X-SPAM... headers.

Are you sure? It's possible you never get into spamc at all, since your log
"FIRST PASS THROUGH SPAMC" is unconditional, but your call to spamc might get
bypassed.



Reply via email to