How do I report a whole mailbox full of spam to Razor? SpamAssassin only handles single mail messages.

Theo Van Dinter, one of the SpamAssassin developers, has written a script which does this, along with some other reporting features. It can be picked up at

Another simple approach (reported by Seth Arnold) is to use formail, from the procmail package:

formail -s spamassassin -r < /tmp/spam

Even simpler, why not try:

razor-report -M <mbox

Calling razor-report directly will work if your SA install only modifies headers, and does not modify message bodies (ie: report_safe 0).

In general Razor is not concerned with changes to message headers, except to the extent that they affect Razor's ability to parse mime sections. It is however sensitive to changes to the message body itself, and it's unclear if razor can deal with an encapsulated message generated by SA.

  • No labels