Guy wrote:
Hi,

I've got two gateway machines that process aliases. If there is an
alias that maps to a remote address (eg. hotmail) the mail is relayed
directly to the remote domain, or if the alias maps to a local domain
the message is relayed to the back end servers. If there is no alias
the message is also relayed to the back end servers.

My main.cf currently has the following in it:
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
proxy:mysql:/etc/postfix/mysql_virtual_catchall_maps.cf
virtual_transport = smtp:backend-server.mail.net

If I want to add address verification on the gateways as well as
process the aliases do I just add:
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_relay_recipient_maps.cf
relay_transport = smtp:backend-server.mail.net

Would replacing virtual_transport and relay_transport with a
"transport" table matching local domains to
smtp:backend-server.mail.net also work?

Something like
transport = mysql:/etc/postfix/mysql_transport.cf

mysql_transport.cf
query = SELECT transport FROM table WHERE local_domain=1 and domain='%s'

Or is there some more elegant way of doing it?

Thanks
Guy


You're making this too hard. These are relay_domains, not virtual_mailbox_domains. Don't make up syntax; use what's documented.
http://www.postfix.org/ADDRESS_CLASS_README.html
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall

List the domains in relay_domains, list valid recipients in relay_recipient_maps.

If you need to do rewriting of addresses, use virtual_alias_maps (NOT! virtual_alias_domains) for those addresses.

Don't use wildcard or catchall address rewrites.

If postfix can't find the destination server on its own, then you can add transport_maps entries for those servers, but don't do this unless necessary.
http://www.postfix.org/postconf.5.html#transport_maps

--
Noel Jones

Reply via email to