procmail
[Top] [All Lists]

Re: bad match?

2002-07-28 14:17:14
At 15:07 2002-07-28 -0400, fleet(_at_)teachout(_dot_)org did say:

thus bk*ru *would* have matched "brutal;" but "bk.ru" should *not* have.
Unless procmail treats "." as "*" ???????

No.

Why not try some of the profferred test filters, rather than using the grep tool, which procmail _doesn't_ use to resolve it's conditions?


Then, at 15:41 2002-07-28 -0400, fleet(_at_)teachout(_dot_)org did say:
On Sun, 28 Jul 2002, Professional Software Engineering wrote:

> WHY aren't you ESCAPING the dots?

Not in the habit?  Lazy?  Didn't see the point?

"Because it's the proper thing to do" generally works for me. Then again, I'm not the one with a recipe matching something I can't identify...

> They're wildcards unless escaped.

Aha!  You mean (in procmail) . = * = .* ??
(This answers a question I posted just a minute ago.)  This would mean
that
* ^From(_dot_)*somebody(_at_)somewhere\(_dot_)com
could be just as well written as
* ^From(_dot_)somebody(_at_)somewhere\(_dot_)com
??

No. They're a single character wildcard. * is a wildcard modifier - it identifies the count of the _previous_ element.

        . = one of any character
        .* = zero or more of any character
        * = zero or more of whatever argument preceeded it
        ? = zero or one of whatever argument preceeded it.

> WHY don't you use MATCH and enable VERBOSE logging to see what is matching?

I already have VERBOSE logging, else I wouldn't have know the (?mis?)match
was on this particular recipe.

That's a big assumption. You never SAID you were running with VERBOSE - for all anyone here knows, you put in debug log messages and ran the message through and bracketed which rule matched based on the debug log comments. Excepting that you actually mentioned the log, one could also think that you identified this filter because it's the only filter that actually files anything into the spam.mbx, or runs the other command you're invoking, etc.

Few people (that I'm aware of) run with VERBOSE=ON for typical operation - perhaps it'll be turned on and off around certain braced recipes, or just turned on during testing (more typically AFTER something's gone sideways).

HOWEVER, I haven't been able to talk anyone into showing me how MATCH and \/ worked.

You might want to check out the manpages then. The construct isn't complicated - use '\/' in your condition, and if the expression given after that matches, then $MATCH is set to that text. The VERBOSE log will reflect this setting as well. You can do further tests against $MATCH, or manually emit it to the log, pass it as an argument to a program, or rewrite a header with it, or any number of things.

> (see 'man procmailsc' for more information on scoring)

I'm probably not quite ready for "scoring" yet.

It'd go a LONG way towards identifying which of your regexps is matching, whether you plan to use scoring in typical tests or not. Set up a "sandbox" (see my .sig) and run your test filters there - no need to change your live filter to indentify why THIS message triggered your spam recipe.

Examples help me more than anything else.

See 'man procmailex', and the various FAQs linked from <http://www.procmail.org>. Era, Nancy, and Jari all have excellent examples in their various - and extensive - resources.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  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

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