Configure QMail to use a Smarthost
Routing all mails to a smarthost
The file where
SMARTHOST relaying to smarthost settings are kept is named smtproutes
and is usually found in /var/qmail/control/. We use the hostname
'mxpool1.spamgateway.comodo.com' (EU
based server) and
mxpool1.us.spamgateway.comodo.com
(US
based server)
on port 587 as
outgoing server:
European
Union
echo:
mxpool1.spamgateway.comodo.com:587" >
/var/qmail/control/smtproutes
United
States
echo: mxpool1.us.spamgateway.comodo.com:587"
> /var/qmail/control/smtproutes
This
command will set qmail that all your mails will be routed to
mxpool1.spamgateway.comodo.com:587 ormxpool1.us.spamgateway.comodo.com:587
according to your preferred routing (will
remove other existing lines).
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. |
European
Union
echo
"example.com: mxpool1.spamgateway.comodo.com:587" >>
/var/qmail/control/smtproutes
United
States
echo "example.com: mxpool1.us.spamgateway.comodo.com:587" >> /var/qmail/control/smtproutes
This
will route outgoing email to "example.com" via the
smarthost. (rest of the lines will be kept).