Tim Legg wrote:
Thanks for the tip and the links you provided me. The Standard Configuration
Readme provided a lot of insight!
This is how my main.cf is set up and seems to work, but it is not correct
according to what I read earlier.
/etc/postfix/main.cf
mydestination = example1.com, genex.example1.com, localhost.example1.com,
localhost
virtual_alias_domains = example2.org, localhost.example2.org genex.example2.org
virtual_alias_maps = hash:/etc/postfix/virtual
OK, example1.com is a local domain, example2.org is a virtual
alias domain.
/etc/postfix/virtual
l...@example1.com legg
t...@example2.org legg
These are user mappings. Bare usernames in the result get
$myorigin added to them; generally it's better to use a fully
qualified address to prevent surprises.
So I changed the main.cf to this
/etc/postfix/main.cf
mydestination = localhost
virtual_alias_domains = example1.com, genex.example1.com,
localhost.example1.com, example2.org, localhost.example2.org genex.example2.org
virtual_alias_maps = hash:/etc/postfix/virtual
Upon instating these changes, mail to l...@example1.com gets returned back.
User unknown in virtual alias table.
Because example1.com is now a virtual_alais_domain, and
virtual_alias_maps rewrites l...@example1.com ==> legg ==>
l...@$myorigin, which is apparently l...@example1.com.
All users in virtual_alias_domains must be rewritten to a
different domain, typically a domain listed in mydestination.
Any suggestions how this can be set up in a way that is proper, robust and
still delivers mail?
# main.cf
mydestination = ... localhost.localdomain
# virtual_alias_maps
l...@example1.com l...@localhost.localdomain
In this example you can substitute some domain listed in
mydestination for "localhost.localdomain" or literally use
"localhost.localdomain".
-- Noel Jones