On 5/19/2010 10:42 AM, Phil Howard wrote:
I want to translate a domain (foo.myohiovalley.net
<http://foo.myohiovalley.net>) to another domain (myohiovalley.net
<http://myohiovalley.net>) such that for all users
(xy...@foo.myohiovalley.net <mailto:xy...@foo.myohiovalley.net>) they
will be delivered (I'm using virtual_mailbox_domains, etc) as in the
target domain (xy...@myohiovalley.net <mailto:xy...@myohiovalley.net>).
I thought this would be accomplished by putting "foo.myohiovalley.net
<http://foo.myohiovalley.net>" in virtual_alias_domains and mapping
"foo.myohiovalley.net <http://foo.myohiovalley.net>" to
"myohiovalley.net <http://myohiovalley.net>" in virtual_alias_maps.  But
that isn't happening as expected.  I tried mapping an actual user
"xy...@foo.myohiovalley.net <mailto:xy...@foo.myohiovalley.net>" to
"xy...@myohiovalley.net <mailto:xy...@myohiovalley.net>" and that
actually did work.  But I want to do this by domain name only so I don't
end up with <number_of_domains> times <number_of_users> mapping entries.


The correct way to do this is a 1-1
u...@foo.example.com  u...@example.com
mapping. Use a script to generate the required tables and don't worry about the number of entries.

While postfix does support wildcard domain > domain rewriting, it is highly discouraged because it disables recipient validation -- that tends to fill your queue with undeliverable mail and will get you blacklisted as a backscatter source.

As an alternative, you may be able to use smtp_generic_maps to rewrite the destination domain on the fly during delivery. See:
http://www.postfix.org/ADDRESS_REWRITING_README.html#generic

  -- Noel Jones

Reply via email to