<domain>
Normally the node asks DNS for the recipient domain’s MX records and follows them. This line replaces or modifies that lookup: you name the servers yourself — by names, addresses or an instruction to take the MX records of another domain.
The list is structured like real MX records. A comma separates hosts within one preference level — the node rotates through them; a semicolon starts the next level, which is used only if the first one does not respond. An address is written in brackets — [10.1.1.1] or [IPv6:2001::1] — and a port can be given after a colon.
A separate kind is lookup-mx:. It does not cancel DNS but redirects the question: “take the MX records of this domain.” This is how combined queues whose names do not exist in DNS work: queue-to and wildcard combining do not work at all without it.
lookup-mx: is preferable to a list. It does not go stale: if the receiver changes gateways, the node learns about it from DNS. An explicit list cannot do that.
Preference levels are not decoration. Everything listed with commas is used by the node in rotation; it moves to the next level only when the previous one is unavailable. A list with one level is load balancing, with two levels it is a backup.
Set the port here, not separately. A port given after a colon overrides default-smtp-port for this recipient domain.
# a combined queue has no domain of its own in DNS — we take someone else's MX <domain hotmail.queue> smtp-hosts lookup-mx:hotmail.com</domain> # two in rotation, then a backup address with a non-standard port, # then the last resort <domain email.test.com> smtp-hosts h1.test.com, h2.test.com; [10.1.1.1]:2525; last.test.com</domain>
what people get wrong and how it ends3 mistakes▶
our experience
§ 3.3.10.69
our experience
2 relations
pmta show settings hotmail.queue/vmta1 | grep -i smtp-hosts dig +short MX hotmail.com | sort -n
3 articles
◇Accept, route, deliverA message’s path inside the node: accept, decide where, deliver — and all the settings live between these three steps.◇Four value types the whole config is written inBoolean, domain pattern, regular expression and time interval — defined once in § 3.2 and then used by all directives.◇Reloading settings versus restarting the serviceThe configuration is read at startup, and after that edits are picked up by the reload command — except for the directives the manual marks as requiring a restart.