procmail
[Top] [All Lists]

Re: From: checking

2001-06-11 10:26:01
Igor Purchanskiy asked,

| From time to time i get spam in my mailbox addressed directly to me, but
| From: header lists some none-existing-user(_at_)linuxinside(_dot_)com(_dot_)
| linuxinside.com is my own server, so i was wondering how can i make
| procmail check my /etc/mail/virtusertable or some other way to determine if
| that message has forged From: header. However, my wife and few of my friends
| use @linuxisnide.com e-mail addresses, so i can not really block all

| * ^From:.*linuxinside.com

Since there are so few legitimate sending addresses in that domain -- after
all, virtusertable is for authorized receiving addresses, which may or may
not be proper as addresses for senders -- perhaps it would be easier to 
hard-code them into your .procmailrc than to make procmail invoke grep on the
virtusertable for every incoming message:

 :0: # first four characters inside brackets are caret, space, tab, comma
 * ^From:.*\/[^         ,<@%!;:]+(_at_)linuxinside\(_dot_)com
 * ! MATCH ?? ^^(igor|othername|anothername|fourthname|yetanothername)@
 fakelocalfromheader

where the regexp in the second condition includes all legitimate senders on
your server.  You will have to update the regexp yourself whenever you add
or remove a user, but I get the feeling that it doesn't happen often.

_______________________________________________
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>