procmail
[Top] [All Lists]

Re: sending false positives to original recipients

2003-07-01 10:10:11
Michael Meltzer asked:

All spam indicated mail of our domain goes to one folder.
after manually deleting all real spam I want to send the
false positives to the original recipients.
How can i do this (maybe from the command line) ?

In most cases you can't, because by then the original envelope recipient information is lost. *If* your MTA preserves it (in a Delivered-To: or X-Envelope-To: or X-Original-To: header, for some examples), then you can try something like this:

#!/bin/sh
lockfile spamfolder.lock
mv spamfolder workfolder
rm -f spamfolder.lock
formail -A "X-Loop: false positive, not spam" \
  -s falsepositive < workfolder
# after completion, workfolder must be rm'ed by hand

where falsepositive is an executable containing something like this:

#!/usr/local/bin/procmail
:0
* ^(Delivered|X-Envelope|X-Original)-To:\/.+
! $MATCH

You haven't told us enough for me to know whether, once a message gets to that point, any loop detection is needed. (That is, does remailing the message send it back through the same spam tests that mistook it for spam the first time?) If it is, you'll have to do something with the routines that put a message into the spamfolder in the first place so that they will trust a message that is already marked with the above X-Loop: header.

But again, the general answer is that it can't be done.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail