procmail
[Top] [All Lists]

Re: ^TO_.*(abc(_at_)abc(_dot_)com|xyx(_at_)zyx) does not work ?? Why ?

2002-05-30 23:12:36
On Thu, May 30, 2002 at 09:20:49PM -0700, S Semple wrote:
It appears that my tests show that Example one does not find anything in the
brackets but example two does. If I'm right Im confused why.

Can anyone explain, its late maybe I missed something?

Example one
* ^To_.*(UNDISCLOSED\.RECIPIENTS@|JUNO|junk.com)

Well, for starters, that should be "^TO_", not "^To_", the .* is unnecessary
as the ^TO_ macro already takes care of that. What you've instructed it to
look for is anything (To:, Cc:, Bcc:, etc as per ^TO_)
"Undisclosed.recipients@" OR "juno" OR "junk.com". As ^TO_ matches whole
addresses, not words within the address, this doesn't make sense.

I'm guessing what you're really looking for is "Anything ^TO_
'undisclosed.recipeints" at either 'juno.com' or 'junk.com'"

* ^TO_undisclosed\.recipients@(juno|junk)\.com

Which would match "undisclosed(_dot_)recipients(_at_)juno(_dot_)com" and 
"undisclosed
recipients(_at_)junk(_dot_)com".

If what you're trying to achieve is "Anything (To:, Cc:, Bcc:, etc) any
address containing the strings 'undisclosed.recipients@' OR 'juno' OR
'junk.com', in any part of the address", then

* ^TO(undisclosed\.recipients@|juno|junk\.com)

Which would match, for example, 
"undisclosed(_dot_)recipient(_at_)all-possible-domains",
"juno(_at_)all-possible-domains", 
"anything(_at_)any-domain-containing-the-word-juno",
"anything(_at_)any(_dot_)subnet(_dot_)of(_dot_)junk(_dot_)com" or even 
"junk(_dot_)com(_at_)all-possible-domains".

-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail