Procmail and SpamAssassin seem not to process some of my messages when the load gets too high

When procmail is calling SpamAssassin and a large number of messages come in, SpamAssassin may occasionally fail to run, perhaps because the load exceeds the allowable quota. Procmail then recovers the mail and continues with the procmail script, but with the message having gotten no SpamAssassin markup whatsoever. This results in spam getting through, without the "probably spam" markup from SpamAssassin (also known as a FalseNegative). The solution (other than moving to a more powerful server, which also works) is to add a second SpamAssassin invocation to procmail in case the first one didn't work. Compare to the default script shown at UsedViaProcmail.

I has this problem on an overloaded machine (and so switched to a better hosting service), and this solution completely solved the problem until I switched:

:0fw: spamassassin.lock
* < 256000
| spamassassin

# Try a second time if SpamAssassin failed

:0fw: spamassassin.lock2
* ! ^X-Spam-Level:.*
* < 256000
| spamassassin

* ^X-Spam-Status: Yes


  • No labels