On 2011-09-09 02:00, Wietse Venema wrote:
Jay Ess:
On 2011-09-09 01:17, Wietse Venema wrote:
Jay Ess:
I have a primary SMTP-server that receives for domain.tld (duuuh)
and it stores it in Maildirs.  I also want to forward every mail
received for the domain to another server that will do the exact
same thing.
Use pcre-based recipient_bcc_maps.

/etc/postfix/main.cf:
      recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc

/etc/postfix/recipient_bcc:
      /^(.+)@example\.com$/     $1...@other.example.com

        Wietse

Thanx for the reply!
There are no other way doing it without rewriting the destination address?
I do not recall that this was a requirement.
Not a requirement but it would be nice to be able to have a "final" configuration on the new server and just be able to change DNS MX records when i feel it works not having to change config (virtual data stored in MySQL) and possible screw things up ;)
I will explain why i want to do this.
We shall migrate to another mail server and i want to iron out almost
every thing that can go wrong before i move the users to the new server.
This is the last step for me where i receive incoming mail on both
servers and maybe let some users try the new server.
Use an smtpd_proxy_filter program that splits the mail into two
streams, without doing content inspection. This program should reply
to end-of-data only after both destinations reply with 250 to their
end-of-data. This could be done with a tiny Net::SMTP perl script.

Ill try the bcc rewrite when i wake up tomorrow and make scripts for changing the config to minimize the risk of screwing things up. Writing some kind of proxy script was in my thoughts but in my mind Postfix would have this feature and i was just tired enough not to find it. Having it in transport and making destination take more values like perhaps :
domain.tld local,smtp:mail2.domain.tld

Anyhow i appreciate you taking time to answer. :)

Reply via email to