procmail
[Top] [All Lists]

Re: Little doubt on receipts.

2008-10-03 10:24:20
At 10:37 2008-10-03 +0200, JoeL wrote:
Hi everybody,

I have a procmailrc file, with 5 receipts,

You probably mean RECIPES.

Receipts has a whole different meaning when discussing email.

when an email arrives, it should be processed by one of the first 3 receipts, if it doen't match any of the first 3, then do the 4 & 5.

At the moment, if the email matches receipt 1, 2 or 3, its processed, but it also ends up in the maildir, that means its going through all the receipts untill reach n.5, so i figure maybe i have to add the "E" flag (im not sure about this) to all the receipts?

my procmailrc file:
[snip]

The dots are really ghelpful, SINCE THEY LIKELY PERTAIN TO WHY THINGS ARE NOT WORKING. If those recipes do not take an action which is consistent with DELIVERY of the message, then procmail will not consider the message delivered, and will continue processing. To wit:

:0
{
        FOO=12
}

:0
stuffed.mbx


Since neither recipe has conditions, they'll always match when processing reaches them. The first one however doesn't DELIVER (pipe the message, or store it to a mailbox/maildir), so procmail will continue to the second. It is NOT unusual to have this sort of setup, since the first recipe may set conditions which are evaluated by others. Your "..." redacting of your rcfile thus conceals your problem from the prople you're asking assistance from.


Enable VERBOSE logging (at the top of your RCFILE):

LOGFILE=joel.log
VERBOSE=ON

Then check the log contents after one of these mystery messages passes through. Easier would be to take a SAVED message which should have stopped at one of the first three and run it through your rcfile inside a sandbox. See my .sigline.


:0
* ^Subject:.*
* 
^To:.*(jazzbucle(_at_)lotus[(_dot_)]domain[(_dot_)]com|jazzbucle(_at_)es[(_dot_)]domain[(_dot_)]com)

If you want to match DOTS, rather than putting them into a character class, just escape them properly:

        \.

Do you have a purpose to checking the Subject header the way that you do? The only thing that does is ensures that there IS a Subject: header (versus it being completely absent).

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