procmail
[Top] [All Lists]

Re: matching on bad word list but which word was it ?

2006-08-20 05:26:11
On Sun, Aug 20, 2006 at 02:00:52PM +0200, Matthias Häker wrote:

Dallman Ross schrieb:

thats surprised me a bit cause i took the example from a predefined
recipe  from the Goldvision Procmail  implantation

Well, maybe that's another worm, but no one that I have a sample
of.

Now I have to confess that I made an error earlier in what
I said about quoting.  The backslash will need to be quoted
wherever it is.  You can use another backslash, or use "[\]".


*  B  ??  ()\/\< 
{ BAD=$MATCH }  

will look for "<"   in the mailbody

*  B  ??  ()\/\\\< 
{ BAD=$MATCH }  
will look for "\<"  in the mailbody , 

*  B  ??  ()\/[\]\< 

will look for "\<" ...

this can be quite confusing 

Only because you're quoting when you don't need to.  "<" does
not need quoting.  (But when it's the first char on a condition
line, it means a size indicator unless it's quoted.)

And "\<" is a special macro token in procmail, so be careful.
(See "man procmailrc".)

If you quote things that don't need quoting, of course it still
works.  But your "[\]\<" does not mean what you think it means.
It will, e.g., match on

    \-<

Dallman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail