procmail
[Top] [All Lists]

Re: bad regular expression error

2004-06-23 10:20:20
Thanks. This was a recipe that I was copying and pasting. It was just a typo. I have somewhere on the order of a couple of hundred rules involving domain names with that regexp at the end of it. They work OK, I just blew the edit.

Again, thanks for your help.

Curtis

Professional Software Engineering wrote:

At 10:05 2004-06-23 -0400, Curtis Maurand wrote:

Hello,
yesterday, I dropped a period in a regular expression which generated an "invalid regexp" error. please see the following rule

:0 B:
* emailsenders\(com|net|org|info|biz|name|us)
spam

I realize that there should have been a period before the opening parenthesis. However, instead of skipping the rule the mail went into the ether. What is procmail's behavior when such an error occurs.


Well, take the rule and put it into a sandbox (with verbose logging) and pump some mail into it.

procmail: Invalid regexp "emailsenders\(com|net|org|info|biz|name|us)"
procmail: Match on "emailsenders\(com|net|org|info|biz|name|us)"

and given your recipe, the messages SHOULD have ended up in the spam mailbox. Why? Well, if you have a no-condition recipe, it'll simply execute the delivery. The above "Match on..." bit in a verbose log is, I believe, an artifact of the logging not fully comprehending the condition was discarded (the logically easy way to discard a rule while processing a loop is to simply treat the result as TRUE). If the condition line included an inversion, apparently that would be considered as well, thus inverting the result of the default-to-TRUE invalid regexp. I may be wrong in here - it's supposition based on how I've seen it respond, and I try to TEST recipes and avoid putting broken ones into service.

from 'man procmail':

       Invalid regexp "x"     The regular expression "x" contains
                              errors (most likely some missing or
                              extraneous parens).



It's a good idea to run new recipes through a sandbox before putting them into play.

---
 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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail



____________________________________________________________
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

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