procmail
[Top] [All Lists]

Re: Procmail rule

2002-04-26 11:46:39
I am extreamly green when it comes to procmail recipies. I would like to set
up a rule that would take and forward the email off to another address if a
certian header is not listed, but if it is, deliver it to the local email
box.
How would one go about that? As I said I am rather new to procmail and have
tried to review the docs and man pages but for some reason just not able to
grasp the logic behind the various flags.

Perhaps you've not checked the 'procmailex' man pages for some simple
examples that are very like what you want.  It would be worth your while
to give it a read through - lots of really helpful stuff in there.

Here's a recipe that tests whether there is not a 'X-My-Header:' header
and forwards the mail if there isn't.  Any mails that do have that
header will fall through to the next recipes, or will be delivered to
the default mailbox if there are no other recipes.

 :0:
 * ! ^X-My-Header:
 ! another(_at_)address(_dot_)kom

But do give the man pages another look.

Hope that helps,
Martin
-- 
Martin McCarthy                 /</    http://procmail.non-prophet.org
    `Procmail Companion'        \>\
     Addison Wesley             /</                  PGP key available
_______________________________________________
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>