Configuring PostFix to use a Smarthost
Routing all mails to a smarthost :
These instructions assume the postfixconfig files live in /etc/postfix/main.cf
In/etc/postfix/main.cfadd the line:
relayhost = mxsrv1.spamgateway.comodo.com:587
Routing all mails for a specific domain to a smarthost :
| Note: The information below relates to a very
specific customer requirement and is not recommended for most
deployments. A configuration like this can cause problems which will
be hard to troubleshoot. Unless you are sure you need to use this
setup, please explore the other available options for routing mail.
|
Add a line to /etc/postfix/transport:
example.com smtp:mxsrv1.spamgateway.comodo.com:587
generate a postmap file :
postmap hash:/etc/postfix/transport
To use the transport file, add or edit a line in /etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
Restart Postfix and all mail. The mail for selected domains should go trough the Smarthost.

