No, the second rule should ONLY process when a message passes the first rule (and does NOT get bounced out to gmail.) I believe, please correct me if I'm wrong here, but I believe the way you've rewritten it, rule 2 will ALWAYS run, regardless of the outcome of rule 1. This will result in duplicate message being sent to the second e-mail address.
On Wed, Jan 23, 2013 at 9:10 PM, jdow <j...@earthlink.net> wrote: > The basic rule to remember with procmail is that once the email is > delivered processing is ended. So if the rule passes you must then > clone the email and deliver the clone. That allows the rules to keep > on processing. > > I imagine you also want the second rule to continue processing as well. > > Something akin to > :0 > * !^X-Forwarded-For: kira...@gmail.com ash...@pcraft.com > > * !^X-Forwarded-For: kira...@gmail.com ash...@pcigrafx.com > * !^From.*kira...@gmail.com > * !^To.*ashley@papillon.pcraft.**com <ash...@papillon.pcraft.com> > { > :0 c > ! kira...@gmail.com > } > > :0c > > * ^X-Forwarded-For: kira...@gmail.com ash...@pcraft.com > * ^X-Forwarded-For: kira...@gmail.com ash...@pcigrafx.com > { > :0 c > ! salesdept > } > > {^_^} > > > On 2013/01/23 20:00, Ashley M. Kirchner wrote: > >> The way this should work is as follows: >> >> - new e-mail arrives at the recipient's box and procmail picks it up and >> checks >> the X-Forward-For header >> - if the header does NOT contain any of those listed, it forwards the >> message to >> the specified gmail address >> > STOP < >> >> - if the header exists and contains any of the matches listed, the >> message gets >> dropped into the recipient's inbox >> AND >> - it is at this point that I want it to also forward a copy of said >> message to >> the second e-mail address >> >> >> The first rule works as expected. Message comes in, first rule checks it >> and >> upon failing, bounces back out to gmail. Nothing happens after that. >> When the >> message returns, it passes the first rule and gets dropped in the >> recipient's >> box. When I added the second rule, nothing changed. The first keeps >> running as >> is and the second is simply ignored. >> >> Now, perhaps I'm wrong in thinking that when it comes back and passes the >> first >> rule, it will also run through the second rule. Is this a case where I >> need to >> write things wrapped in a nest? Sort of like an IF .. THEN .. ELSE? >> >> A >> >> >> >> On Wed, Jan 23, 2013 at 7:50 PM, jdow <j...@earthlink.net >> <mailto:j...@earthlink.net>> wrote: >> >> On 2013/01/23 15:28, Ashley M. Kirchner wrote: >> >> Ok, I'm still trying to figure this out. On the new, test >> account, i >> can get it >> to log so I just need to figure out the other two. However, I >> recreated the >> same recipe on the test account and what I'm seeing in the log is >> the >> first part >> of the recipe only, it doesn't seem to do anything with the >> second part. >> >> So this (adjusted for the test account): >> >> LOGFILE=/var/log/procmail >> VERBOSE=yes >> >> :0 >> * !^X-Forwarded-For: kira...@gmail.com <mailto:kira...@gmail.com> >> <mailto:kira...@gmail.com <mailto:kira...@gmail.com>> >> myt...@pcigrafx.com <mailto:myt...@pcigrafx.com> >> <mailto:ash...@pcigrafx.com <mailto:ash...@pcigrafx.com>> >> >> * !^X-Forwarded-For: kira...@gmail.com <mailto:kira...@gmail.com> >> <mailto:kira...@gmail.com <mailto:kira...@gmail.com>> >> myt...@pcraft.com <mailto:myt...@pcraft.com> <mailto: >> ash...@pcraft.com >> >> <mailto:ash...@pcraft.com>> >> * !^From.*kira...@gmail.com <mailto:kira...@gmail.com> >> <mailto:kira...@gmail.com <mailto:kira...@gmail.com>> >> * !^To.*mytest@papillon.pcraft._**_com <mailto:mytest@papillon.** >> pcraft.com <myt...@papillon.pcraft.com>> >> <mailto:ashley@papillon.__pcra**ft.com <http://pcraft.com><mailto: >> ashley@papillon.**pcraft.com <ash...@papillon.pcraft.com>>> >> ! kira...@gmail.com <mailto:kira...@gmail.com> <mailto: >> ash...@gmail.com >> >> <mailto:ash...@gmail.com>> >> >> :0c >> * ^X-Forwarded-For: kira...@gmail.com <mailto:kira...@gmail.com> >> <mailto:kira...@gmail.com <mailto:kira...@gmail.com>> >> myt...@pcigrafx.com <mailto:myt...@pcigrafx.com> >> <mailto:ash...@pcigrafx.com <mailto:ash...@pcigrafx.com>> >> >> * ^X-Forwarded-For: kira...@gmail.com <mailto:kira...@gmail.com> >> <mailto:kira...@gmail.com <mailto:kira...@gmail.com>> >> myt...@pcraft.com <mailto:myt...@pcraft.com> <mailto: >> ash...@pcraft.com >> >> <mailto:ash...@pcraft.com>> >> ! salesd...@pcraft.com <mailto:salesd...@pcraft.com> >> <mailto:salesd...@pcraft.com <mailto:salesd...@pcraft.com>> >> >> >> >> Ashley, it might pay to explicitly say, in words, what you think you >> want to do if the first rule passes, if the first rule does not pass >> and the second rule passes, and if neither rule passes. >> >> As it is your description of passing the first rule is the correct >> action for what you've developed as a rule. You have delivered the >> email and rule processing ceases at that point. So you might have >> to clone the output of the first rule to pass it to the second rule >> IF that is the action you want based on your disappointment at these >> rules doing what you told them to do. >> >> {^_^} >> >> >> -- >> users mailing list >> users@lists.fedoraproject.org >> <mailto:users@lists.**fedoraproject.org<users@lists.fedoraproject.org> >> > >> >> To unsubscribe or change subscription options: >> https://admin.fedoraproject.__**org/mailman/listinfo/users >> >> <https://admin.fedoraproject.**org/mailman/listinfo/users<https://admin.fedoraproject.org/mailman/listinfo/users> >> > >> Guidelines: >> http://fedoraproject.org/wiki/**__Mailing_list_guidelines<http://fedoraproject.org/wiki/__Mailing_list_guidelines> >> >> >> <http://fedoraproject.org/**wiki/Mailing_list_guidelines<http://fedoraproject.org/wiki/Mailing_list_guidelines> >> > >> Have a question? Ask away: http://ask.fedoraproject.org >> >> >> >> >> -- > users mailing list > users@lists.fedoraproject.org > To unsubscribe or change subscription options: > https://admin.fedoraproject.**org/mailman/listinfo/users<https://admin.fedoraproject.org/mailman/listinfo/users> > Guidelines: > http://fedoraproject.org/wiki/**Mailing_list_guidelines<http://fedoraproject.org/wiki/Mailing_list_guidelines> > Have a question? Ask away: http://ask.fedoraproject.org > >
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org