procmail
[Top] [All Lists]

Re: Filtering out mail without a "From" header

2000-01-26 10:00:49
On 26 January 2000, Dominic Mitchell <dominic(_at_)cedep(_dot_)net> wrote:

Hi,

This must be trivial, how can I filter out mail that does not have a
particular header like "From:"?  I am being spammed hard by someone
and here are the full headers!

X-From-Line: foo(_at_)bar  Wed Jan 26 09:33:52 2000
X-Gnus-Mail-Source: directory:/home/dominic/email/incoming/
Message-ID: <m3snzkhoo6(_dot_)fsf(_at_)totally-fudged-out-message-id>
X-Sorted: SPAM
Lines: 181
Xref: rlevesque.com spam:160
X-Gnus-Article-Number: 160   Wed Jan 26 09:51:05 2000

Headers like "Received" or "From" are missing.  Sometimes like in this
case I have trapped his message, but I am not trapping it all the
time.  If I was rejecting mail say because either the "Received" or
"From" field are missing I would catch him all the time.

        :0:
        * ! ^From:
        spam

        :0:
        * ! ^(To|Cc):
        spam

        :0:
        * ! ^Received:
        spam

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc