Link to home
Start Free TrialLog in
Avatar of bryanatm
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.
Avatar of ai_ja_nai
ai_ja_nai
Flag of Italy image

I know how to do it via postfix:

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/transport

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.
ASKER CERTIFIED SOLUTION
Avatar of ai_ja_nai
ai_ja_nai
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bryanatm
bryanatm

ASKER

Thanks ai ja nai.