Re: [maildropl] Problems with regular expressions
Brought to you by:
mrsam
From: Thorsten H. <lis...@th...> - 2006-03-30 12:22:27
|
Moin, * Christian Lerrahn wrote (2006-03-30 17:34): >Let's say I want to filter out all emails coming from ab...@de.... I >tried the following. > >/From:\s+.*abc@def\.com/ >/From: *ab...@de.../ > >However, the only thing I ever got to work was something like > >/From: ab...@de.../ > >Now the line might also be "ABC" <ab...@de...> and this doesn't match any >more. From what the documentation said, everything looked to me pretty >much like perl regexps but obviously this is not exactly true. How would >the correct rule be written? How about using $FROM? Maildrop already gets the "Message envelope sender" for you, so just check on that. Matching mail adresses is not trivial. Friedl has a regex for this in his book which is one solid page long. Others say it can't be done at all. Anyway, for the case you mention above, try /^From:.*?ab...@de...$/. Thorsten --=20 I believe that there are more instances of the abridgment of the freedom of the people by gradual and silent encroachment than by violent and sudden usurpations. - James Madison |