How to: Forward Mail Through an External SMTP Server¶
InterWorx allows the ability to relay messages sent from the InterWorx Server through an external SMTP Server. This can be done at a server-wide (Smtproutes), or domain-specific (Senderroutes) level.
More detailed information on Smtproutes can be found here.
Note
The external SMTP server must be configured to allow the InterWorx server to relay through it.
Contents
To Set Up Using an External Relay Globally¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, use the text editor to open
/var/qmail/control/smtproutes
vim /var/qmail/control/smtproutes
Add the external mail server to the file with the format
:{external-server}
, replacing{external-server}
with the corresponding information. For example::relayhost.com
Save the file and exit the text editor
Restart the SMTP service
service smtp restart
To Set Up Using an External Relay Per-Domain¶
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, use a text editor to create a file named
/var/qmail/control/senderroutes
. The following example uses the vim text editor:vim /var/qmail/control/senderroutes
Add the domain to be forwarded, and the external mail server to the file with the format
{domain}:{external-server}
, replacing{domain}
and{external-server}
with the corresponding information. For example:example.com:relayhost.com
Save the file and exit the text editor
Restart the SMTP service
service smtp restart