procmail
[Top] [All Lists]

Re: Failure handling of Carbon Copies

2001-08-02 15:31:51
On Thu, Aug 02, 2001 at 12:42:33PM -0400, W. James Showalter, Jr. wrote:
Case 1.

:0 E
* ^Subject:.*mygroup
 {
      :0 c:
       $FOLDERS/mymailgroup

      :0:
      *^Subject.*ANNOUNCE
      /var/mail/mymailbox
 }

Case 2.

:0 E
* ^Subject:.*mygroup
 {
      :0 c:
      *^Subject.*ANNOUNCE
      /var/mail/mymailbox

      :0:
       $FOLDERS/mymailgroup
 }

The first case puts a copy of *everything* related to mygroup in my
default mailbox (which is also /var/mail/mymailbox).  The second case does
not (i.e. it behaves the way I would like).  Assuming my observations are
correct I believe this is because of the way a carbon-copy is handled in
case of failures on subsequent conditions.  Can anyone confirm or
elaborate on this? I didn't notice anything in the FAQ's on this specific
situation.  I have been using procmail for years but never noticed this
behavior before.

You get a copy of everything in your mymailbox folder in the first case
because if the second nested condition (* ^Subject.*ANNOUNCE) is not met, the
copy will fall through and be processed by the rest of your rc file. If it
doesn't match on anything else in the rc file, it will be delivered to your
default mailbox. Whereas in the second case, if it is NOT an ANNOUNCE, the
message will fall through the first nested condition and be caught by the
second. If it IS an ANNOUNCE, the first nested condition will catch it, and
the copy will be caught by the second.

-- 
Andrew Edelstein        -       andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com
_______________________________________________
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>