| Main Archive Page > Month Archives > postfix-users archives |
Wietse Venema:
> Drew Mazurek:
> > We have an environment with two tiers of mail servers. The outer Postfix
> > servers receive mail for our entire domain and handle delivery for certain
> > addresses. Other specific regexp addresses at the same domain need to be
> > passed to different internal SMTP servers. Anything else must be bounced
> > by the outer servers.
>
> Use the firewall/gateway example in
> http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall
> to configure the domain as a relay domain.
>
> Use virtual_alias_maps (NOT VIRTUAL ALIAS DOMAINS) to deliver some
> addresses locally. See
> http://www.postfix.org/STANDARD_CONFIGURATION_README.html#some_local
If you're using different inside hosts, this would also require
transport_maps settings to tell postfix which recipients go where.
There is one simpler approach, but this requires that your inside
servers accept mail for user@hostname.domain.
1 - Leave mydestination empty.
2 - Make example.com a virtual alias domain:
/etc/postfix/main.cf:
virtual_alias_domains = example.com
virtual_alias_maps = hash:/etc/postfix/example.com
3 - List all recipients in virtual_alias_maps:
/etc/postfix/example.com:
# User that delivers locally
user1@example.com user1@localhost
# User that delivers on internal server
user2@example.com user2@host.example.com
Instead of hash: file, you would use LDAP or *SQL.
Wietse