Date: Sat, 18 Mar 2000 08:28:55 -0800 (PST) From: wellsian <wellsian@caffeine.com> To: C J Michaels <cjm2@earthling.net> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: Procmail: Is there an OR command for procmailrc? Message-ID: <Pine.BSF.4.21.0003180807170.53717-100000@boris.netgate.net> In-Reply-To: <NDBBILKDCLLECBCLPMBIOEAPCAAA.cjm2@earthling.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Nope, no OR. Not explicitly anyway. You can do an OR in your match: * (abc|def|ghi)@somedomain.com Or an exclusive OR (else if) with a sequence of recipes: :0 * abc@somedomain.com | dothisstuff :0 E * def@somedomain.com | dootherstuff :0 E * ghi@somedomain.com | lastchance Only one of the above 3 recipes can fire. That's bad if you want more than one arriving in a single message to be handled in more than one recipe. Only the first match gets to do anything. You can get interesting, doing complex ORs with negation: :0 c * ! abc@somedomain.com * ! def@otherdomain.com * ! ghi@howdyho.com /dev/null <- yes, this is right. We'll pass on the copy. :0 E | at least one of those _did_ match. Do our stuff. Hope that gives you some clues. Dave p.s. Codebert just mumbled "Don't forget your local locks!" :) On Sat, 18 Mar 2000, C J Michaels wrote: > Date: Sat, 18 Mar 2000 11:04:28 -0500 > From: C J Michaels <cjm2@earthling.net> > To: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> > Subject: Procmail: Is there an OR command for procmailrc? > > Hi, > I'm trying to find out if there is an "or" for the procmailrc. I didn't > seem to find an example in procmailrc or procmailex, or in the archives. > > What I would like to do is have anything from a list of addresses go into on > specified folder. How I am currently doing that is to have a separate rule > for each address. I was hoping I could condense this into one rule. > > Any pointers would be helpful. > > Thanks, > -Chris > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003180807170.53717-100000>