procmail
[Top] [All Lists]

Re: Recipe matching

2001-12-18 00:33:57
On Mon, Dec 17, 2001 at 12:58:45PM -0500, High Flight wrote:

Ok.  So if I want to match ONLY the end of a string, like  .ch  in
abc.def.ch  in the "Received" header, how would I write it?

:0
* ^Received:[.ch>$]      ?

Um, no...  As I was forcibly taught recently, square brackets indicate
a *range*, so the above condition would match *every* email that came
in with a Received line in the headers.  :)

If what you *really* want to do is block inbound mail with Received
lines that indicate mail servers in Switzerland and Poland, you could
do something like:

        * ^Received: [a-z0-9]\.(ch|pl)[         <(]

Of course, doing this is probably a bad idea, unless you're willing
to blacklist two whole countries, and all the various Internet resources
contained therein.

Check out some of the spam protection resources out there.  Many exist,
and some are even easy to use.  Lots are mentioned in the procmail FAQ.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

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