You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Werner Schalk <we...@gmx.de> on 2004/02/29 15:21:53 UTC
Empty mails
Hi,
has anyone got a rule to get rid of empty emails that do not have any content?
Bye and thanks,
Werner.
Re: Empty mails
Posted by Loren Wilton <lw...@earthlink.net>.
> has anyone got a rule to get rid of empty emails that do not have any
content?
I posted a thing a while back, but don't have it around in my ruleset at the
moment. As I recall, the characteristics were both the To: and the body
were missing in these.
Something like the following would probably work.
Note! This is UNTESTED!
header __HAS_TO To =~ /^.*$/
body __HAS_BODY /^.*$/
meta EMPTY_MESSAGE (!__HAS_TO && !__HAS_BODY)
describe EMPTY_MESSAGE Contentless header bits
score EMPTY_MESSAGE 3.0
Loren
RE: Empty mails
Posted by Gary Funck <ga...@intrepid.com>.
> From: Werner Schalk
> Sent: Sunday, February 29, 2004 6:22 AM
>
> has anyone got a rule to get rid of empty emails that do not have
> any content?
If you're running procmail, you can place this ahead of the rule
that invokes SA:
:0 B:
* 1^0
* -9876543210^0 [^ ]
empty_msg.mbox
that's a <space><tab> in the square brackets above. The -9876543210 is
a procmail idion which tells it to stop scoring immediately if the
pattern matches. The condition above fails when the first non-blank
character is seen in the message. Thus only empty, or all blank messages
will pass, and will be delivered into empty_msg.mbox. You can change
the file where empty messages are delivered to whatever you want.