-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Wietse Venema
Sent: Saturday, March 05, 2011 6:26 PM
To: Postfix users
Subject: Re: Running a script, archiving, then forwarding.
Alan Fullmer:
> I am attempting to receive mail from one or many domains. I am then
> trying to run a script that [essentially] archives all mail coming
through.
> Lastly, forwarding the messages onto another server.
Use the Postfix built-in recipient_bcc_maps feature to ADD a recipient that
resolves to your script.
/etc/postfix/main.cf:
recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc
transport_maps = hash:/etc/postfix/transport
script_destination_recipient_limit = 1
/etc/postfix/recipient_bcc:
/(.*)@(the\.example\.com)$/ $1-$2@some-domain-here
/etc/postfix/transport:
some-domain-here script:
/etc/postfix/master.cf:
script unix - n n - - pipe
flags=FR user=some-user-here argv=/some/where/script $recipient
References:
http://www.postfix.org/postconf.5.html#recipient_bcc_maps
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/postconf.5.html#transport_destination_recipient_limit
http://www.postfix.org/transport.5.html
http://www.postfix.org/master.5.html
Wietse
---------
Ah, this looks to be more what I am after. I did want to reitterate that I
wasn't apposed to the bcc option(s), it just didn't solve all my needs.
I will give this a shot.
Thanks a ton,
Alan