On 2/8/2016 11:31 PM, Stuart Longland wrote:
> 
> Is it possible to nominate both servers as being the destinations for
> both domains so that a single email sent to user@domain is sent to both
> internal servers?

To deliver multiple messages, you need to have multiple recipients.
 The easiest way to do this is to add a virtual_alias_maps entry for
each user  (NOT virtual_alias_domains) to include a mapping to the
new server.


Here's a bare-bones example:

# main.cf
virtual_alias_maps = hash:/etc/postfix/virutual_alias

# virtual_alias
us...@example.com  us...@example.com us...@new.example.com
us...@example.com  us...@example.com us...@new.example.com
...

Don't be tempted to use wildcard rewriting here; that will break
recipient validation.  Use your favorite scripting language to
generate the list programmatically.

Use a transport_maps entry to route the new domain to the new server

# main.cf
transport_maps = hash:/etc/postfix/transport

# transport
new.example.com  relay:[IP.of.new.server]


And finally, use smtp_generic_maps to rewrite the domain name back
to the original during delivery.

# main.cf
smtp_generic_maps = hash:/etc/postfix/generic

# smtp_generic  -- wildcards OK here
@new.example.com  @example.com


References:
http://www.postfix.org/ADDRESS_REWRITING_README.html
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/postconf.5.html#smtp_generic_maps
http://www.postfix.org/postconf.5.html#virtual_alias_maps



  -- Noel Jones

Reply via email to