This plugin delivers to another mail server. This is a common setup when you want to have a mail server with a solid pedigree of outbound delivery to other hosts, and inbound delivery to users.
In comparison to
queue/smtp_proxy, this plugin waits until queue time to
attempt the ongoing connection. This can be a benefit in reducing connections
to your inbound mail server when you have content filtering (such as
spamassassin) enabled. A possible downside is that it also delays recipient
validation that the ongoing mail server may provide until queue time.
Configuration is stored in this file in the following keys:
SMTP forward outbound messages (set to false to enable Haraka’s separate Outbound mail routing (MX based delivery)).
The host to connect to.
The port to connect to. Default: 25
The maximum amount of time to wait when creating a new connection to the host. Default: 30 seconds.
The amount of seconds to let a backend connection live idle in the connection pool. This should always be less than the global plugin timeout, which should in turn be less than the connection timeout.
Maximum number of connections at any given time. Default: 1000
Enable TLS with the forward host (if supported). TLS uses options from the tls plugin.
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
SMTP AUTH username to use.
SMTP AUTH password to use.
More specific forward routes for domains can be defined. More specific routes are only honored for SMTP connections with a single recipient or SMTP connections where every recipient host is identical.
# default SMTP host host=184.108.40.206 # auth_type=plain # auth_user=user # auth_user=pass [example1.com] host=220.127.116.11 # auth_type=plain # auth_user=user # auth_pass=pass [example2.com] host=18.104.22.168 [example3.com] host=22.214.171.124
Messages with a single recipient to example[1-3].com will get delivered directly to the specified host. Messages with recipients only in the domains example1.com and example2.com will get delivered directly to 126.96.36.199. Everything else gets delivered to 188.8.131.52.
See GitHub Issue #573 for background on the limitations of smtp-forward with recipients in different domains.