Le vendredi 22 avril 2011 à 09:54 -0400, Wietse Venema a écrit : > David Touzeau: > > Le vendredi 22 avril 2011 ? 07:25 -0400, Wietse Venema a ?crit : > > > David Touzeau: > > > > dear > > > > > > > > We need to test a new server in "middle production mode" (especially > > > > anti-spam content filtering, av softwares). > > > > > > > > > > > > In this case, to not disturb the production architecture, we need the > > > > Postfix production server duplicates received mails to this test server > > > > but continue delivering messages to the right next hope. > > > > > > > > How to do that? > > > > > > /etc/postfix/main.cf: > > > recipient_bcc_maps = pcre:/etc/postfix/copy.pcre > > > > > > /etc/postfix/copy.pcre: > > > # One rule per domain that you receive mail for. > > > /^(.*)@the\.example\.com$/ ${1}@test.example.com > > > > > > Google "recipient_bcc_maps pcre" for similar solutions. > > > > > > Wietse > > > > > > Thanks Wietse, a good tip... > > Is there a way to duplicate without changing the domain name. > > This to not have to rebuild aliases/users that are replicated from the > > production server ? > > That requires a transport map for test.example.com, and an > smtp_generic_maps to restore the original domain. > > /etc/postfix/main.cf: > transport_maps = hash:/etc/postfix/transport > > /etc/postfix/transport: > test.example.com testsmtp: > > /etc/postfix/master.cf: > testsmtp unix - - n - - smtp > -o smtp_generic_maps=pcre:/etc/postfix/testsmtp.pcre > > /etc/postfix/testsmtp.pcre > # One rule per domain that you receive mail for. > /^(.*)@test\.example\.com$/ ${1}@example.com > > Anything else, or will this be the last change in the problem? > > Wietse
Great !!! Many thanks Wietes, we will try it !