From owner-freebsd-questions Sat Mar 18 10:45:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from boris.netgate.net (boris.netgate.net [204.145.147.154]) by hub.freebsd.org (Postfix) with ESMTP id 1E7FE37B942 for ; Sat, 18 Mar 2000 10:45:37 -0800 (PST) (envelope-from wellsian@caffeine.com) Received: from localhost (wellsian@localhost) by boris.netgate.net (8.9.3/8.9.3) with ESMTP id KAA63239; Sat, 18 Mar 2000 10:40:16 -0800 (PST) (envelope-from wellsian@caffeine.com) Date: Sat, 18 Mar 2000 10:40:16 -0800 (PST) From: Dave Wells X-Sender: wellsian@boris.netgate.net To: C J Michaels Cc: freebsd-questions@freebsd.org Subject: RE: Procmail: Is there an OR command for procmailrc? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You bet. TRY it. :) And check out the procmailrc and procmailex manpages. Before experimenting, maybe set paranoid logging in your rc file: LOGFILE=$HOME/procmail.log VERBOSE='yes' LOGABSTRACT='all' Oh, this is where another terminal window becomes imperative for watching your log: tail -f mylogfilename Don't leave both VERBOSE and LOGABSTRACT on for too long or your log will bloat. Check the procmailrc manpage for info. Or just try each with simple sample messages and see what's logged. There's plenty of good info on procmail out there. I used to point people to stuff at universities & such. Just search for procmail and tutorial or faq and you should turn up lots of goodies. Haven't done that myself in ages or I'd point you to real places. And just in case you're trying to do some kind of virtual hosting thing, Procmail isn't very good for that. You have to get really tricky to handle messages addressed to more than one of your people. I'll shut up now since I don't know what's up. But if you _are_ trying to handle virtual hosting, check out fetchmail (/usr/ports/mail...) or your MTA's methods. Those are much better places to split multiple addresses arriving at a single mailbox. Good luck! Dave On Sat, 18 Mar 2000, C J Michaels wrote: > Thanks for the info.. I was wondering then, could I do something like... > > * user@abc.com|user@xyz.com > > Thanks again, > -Chris > > -----Original Message----- > > 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: > > > 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message