[prev in list] [next in list] [prev in thread] [next in thread] 

List:       procmail
Subject:    Re: multiple actions for a procmail rule
From:       Aaron Aw <aaronaw () yahoo ! com>
Date:       2001-04-24 1:10:33
[Download RAW message or body]

Thanks for the info. I've actually tried this out and it seems to work the
way i want it...

   
:0c
|/usr/local/bin/hypermail -i -u -p -c
/export/home/rptbd/hypermail_rules/other_undefined_reports


the above recipe is the last in the rc.maillists. hence the emails that
didn't get matched to the earlier recipies will be caught by this one. and
at the same time it will also got into my INBOX.


--- "David W. Tamkin" <dattier@ripco.com> wrote:
> Aaron asked,
> 
> | hi. is it possible for a procmail rule to execute multiple actions?
> 
> Generally, no; to do that one uses a `c' flag within braces or a `c'
> flag and
> an `A' flag; see the procmailrc(5) and procmailex(5) man pages.
> 
> | ie. send/forward to 2 email addresses?
> 
> That can be done in one action:
> 
>  :0 flags
>  * conditions
>  ! ad@dre.ss1 ad@dre.ss2
> 
> |     or having 2 pipes to 2 separate commands?
> 
> That requires two recipes, but with use of braces or an `A' flag the
> conditions can be tested only once.  For examples,
> 
>  :0c other_flags
>  * conditions1
>  action1
>   :0A action_related_flags
>   action2
> 
> or
> 
>  :0 condition-related_flags
>  * conditions
>  {
>   :0c other_action_related_flags
>   action1
> 
>   :0 action_related_flags
>   action2
>  }
> 
> A lot of posts here are cases where people didn't read or ask first,
> wrote
> code like this,
> 
>  # THIS IS WRONG.  DO NOT DO THIS.
>  :0
>  * conditions
>  action1
>  action2
> 
> and were baffled that only action1 was carried out and that in some
> cases
> they also got an error in their logs from action2.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
_______________________________________________
procmail mailing list
procmail@lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic