procmail
[Top] [All Lists]

RE: empty body

2004-02-07 01:18:53


-----Original Message-----
From: Mike Arrison
Sent: Friday, February 06, 2004 4:43 AM

    Lately I've been getting a lot of spam that has no body or
attachments of any kind.  This is probably a really simple rule to
write, but this one is incorrect:

:0 b
* < 1
blank-mail

You'll need the capital B, not lower case 'b' to tell procmail that
the test conditions apply to the body. Lower case 'b', says the action
(ie, delivery to blank-mail) only applies to the body (which leaves off
the headers, and this case would deposit nothing into the file, if the
match had been formulated correctly. And you'll want a lock file:

try:

:0 B:
* < 1
blank-mail

This works also,

NL="
"

:0:
* B ?? ^^[      $NL]*^^
blank-mail

where that's a <space><tab> inside [ ], and NL is a variable set equal to
<newline>.
In this case it'll catch mail's whose bodies are empty, or all white space.




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

<Prev in Thread] Current Thread [Next in Thread>