procmail
[Top] [All Lists]

Re: An 'or' recipe

2017-08-14 03:23:28


On 14/08/17 01:40, John Levine wrote:
In article 
<1502655704(_dot_)21816(_dot_)8(_dot_)camel(_at_)embarqmail(_dot_)com> you 
write:
:0
*^From:susanmay21(_at_)iinet(_dot_)net(_dot_)au |\
^From:billh(_at_)marsjourney(_dot_)info |\
^From:mail(_at_)cchaseharwood(_dot_)com |\
^From:barry(_at_)barryjhutchison(_dot_)com |\
^From:blake(_at_)blakebrivers(_dot_)com |\
^From:help(_at_)bookfunnel(_dot_)com |\
^From:brandon(_at_)brandon-ellis(_dot_)com |\
^From:brian(_at_)brianference(_dot_)com |\
^From:cgockel(_at_)cgockelwrites(_dot_)com |\
^From:contact(_at_)ccekeke(_dot_)com |\
^From:jrobertsonwrites(_at_)gmail(_dot_)com
$AUTHORS
Ugh, see below.

The output to my procmaillog shows
procmail: No match on "^From:susanmay21(_at_)iinet(_dot_)net(_dot_)au 
|^From:billh@marsj
ourney.info |^From:mail(_at_)cchaseharwood(_dot_)com 
|^From:barry@barryjhutchison.
com |^From:blake(_at_)blakebrivers(_dot_)com 
|^From:help(_at_)bookfunnel(_dot_)com |^From:bra
ndon(_at_)brandon-ellis(_dot_)com |^From:brian(_at_)brianference(_dot_)com 
|^From:cgockel@cgo
ckelwrites.com |^From:contact(_at_)ccekeke(_dot_)com 
|^From:jrobertsonwrites@gmail
.com"

Does that look correct?
Yes, it's very rare to have a From: line with no white space or comment
between the From: and the address.  Try this:

:0
* 
^From:.*(susanmay21(_at_)iinet(_dot_)net(_dot_)au|billh(_at_)marsjourney(_dot_)info|mail(_at_)cchaseharwood(_dot_)com|barry(_at_)barryjhutchison(_dot_)com|blake(_at_)blakebrivers(_dot_)com|help(_at_)bookfunnel(_dot_)com|brandon(_at_)brandon-ellis(_dot_)com|brian(_at_)brianference(_dot_)com|cgockel(_at_)cgockelwrites(_dot_)com|contact(_at_)ccekeke(_dot_)com|jrobertsonwrites(_at_)gmail(_dot_)com)
$AUTHORS

For my opinion, John Conover gave the best solution (and more easy to maintananc). Anyway, in case of using ".*" you must at least separate the string from other chars
    like the following:

* ^From:.*\<(sus.......

--udi




If you do a lot of this, you may need to make LINEBUF bigger.  I have
patterns like this that are over 4000 characters long and they work
fine.

R's,
John

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>