procmail
[Top] [All Lists]

Re: recipe failure

2008-07-08 19:51:37
At 12:12 2008-07-08 -0700, Robert Holtzman did say:

Educate me please. Why escape the dots? Other recipes I have work without doing it, ie:

:0:
* ^TO_users(_at_)spamassassin(_dot_)apache(_dot_)org
$HOME/mail/list-spamassassin-users

Because a dot (single character wildcard) will match a dot.

It'll also match anything else. Sure, you're unlikely to encounter a mismatch, but NOT escaping them when they should be escaped is asking for a mystery.


    and

:0:
* ^TO_ubuntu-users(_at_)lists(_dot_)ubuntu(_dot_)com
$HOME/mail/list-ubuntu-users

Notice the TO_ macro in these. They don't generate lock failures. They work perfectly.

I'm guessing /home/holtzmn/mail exists.


Next, the delivery action:

$HOME/holtzm/mail/list-plug-discuss

Whereas /home/holtzmn/holtzmn/mail/ does not.


You're confusing a lowly end user. Are you saying that

procmail: No match on 
"........:(_dot_)plug-discuss(_at_)lists@plug.phoenix.az.us"

means it matched?

No. ERRORS REFERRING TO LOCKFILE FAILURES means it tried to deliver based on a matching condition somewhere. The only time you should see lockfile errors is when it tried to deliver - it isn't going to try to deliver if it didn't match a recipe (well, outside of the default delivery, and people generally don't have problems with that).

:0:
* ^TO(plug-discuss(_at_)lists(_dot_)PLUG(_dot_)phoenix(_dot_)az(_dot_)us)
$HOME/mail/list-PLUG-discuss

Not sure why. Notice the absence of "_" or ":." after "TO". The pm log shows:

Well, the macros ^TO and ^TO_ both INCLUDE a colon in their regexps, so to include an extra one would invite a non-match condition.

procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?):(_dot_)plug-discuss(_at_)lists@plug.phoenix.az.us"

^ roundabout here on the second line, you should see a colon that is PART of the regexp. Whereas the colon a 16 characters later ISN'T part of the macro, it's part of the condition you had on the line. At a minimum, the expression you see there will expect TWO colons, optionally separated by other material.

procmail: No match on 
"^List-ID:(_dot_)*plug-discuss(_at_)lists(_dot_)plug(_dot_)phoenix(_dot_)az(_dot_)us"

procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?):(_dot_)plug-discuss(_at_)lists@plug.phoenix.az.us"

procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)(plug-discuss(_at_)lists(_dot_)PLUG(_dot_)phoenix(_dot_)az(_dot_)us)"

These recipes were run singly at different times. Any idea why one works and not the others?

Compare them, byte for byte. In fact, play like they're two sides of an algebraic equation and cross out terms that match on both sides.

---
 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

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