bryanatm
asked on
Sendmail SMART HOST
Hi,
I would like to use sendmail smart host only for sending mail to a certain domain. For example, I want all mail to be default and send directly. However, for any mail going to ``domain.com'', I would like to use the smart host.
I would like to use sendmail smart host only for sending mail to a certain domain. For example, I want all mail to be default and send directly. However, for any mail going to ``domain.com'', I would like to use the smart host.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks ai ja nai.
1. Edit /etc/postfix/transport. Example
domain.net smtp:[smtp.domain.net]
This means: when the destination is @domain.net, send mail through relay host smtp.domain.net. (The host name is in brackets to disable MX lookup)
2. Run 'postmap /etc/postfix/transport' to update the db (mine is hash)
3. In /etc/postfix/main.cf, enable transport_maps
transport_maps = hash:/etc/postfix/transpor
In this case the map is a hash file, adjust as necessary. For more detail see 'man transport' for the syntax of the transport mappings.