critical
Out of the box, external relaying is forbidden. The manual says it directly: until sources are explicitly allowed, the node accepts submission only from the 127.0.0.1 address. Together with the address of the person responsible for the node, this is one of the two settings the engine does not work without.
Next comes the place people trip over most often. The manual uses the word “relay” for two different questions, and they are answered by different directives:
| Question | Answered by | When needed |
|---|---|---|
| Who can submit mail to us for anyone | always-allow-relaying in the source block | sending: the node accepts mail from its submitting machines |
| For whose addresses we accept mail from anyone | relay-domain and relay-address | receiving: the node handles inbound mail |
The manual stresses: the second pair is useful only where the node handles inbound mail. For pure sending there is no need to configure it at all — the first line does the work there.
Hence the most common confusion: a sender who needs to “allow relaying” reaches for relay-domain because the name fits — and gets nothing.
The other edge is quieter and worse for it: a permission by address does not survive a move. The platform changed its address — submission stopped; a wide mask was brought back “temporarily” — and it stayed forever.
Sending — by an address on the list or by login. The always-allow-relaying yes permission is set in three places: in the 127.0.0.1 source (submission from the machine itself), in a block for each address in “Who may submit mail”, and in every named submission source, which only logged-in clients get into. The general 0/0 block does not have it — so a connection from an address not on the list cannot submit mail without logging in.
The address list suits machines with a fixed address. For a platform that may move to another hosting provider, a login is more reliable: a permission by address would have to be edited on every move.
Receiving — with three pattern rules. The Hub opens receiving for complaints (fbl@fbl.<domain>), for asynchronous bounces (bounce@bounce.<domain>) and for role addresses — dmarc@, postmaster@, abuse@. The last rule did not appear right away: without it, anti-relay bounced DMARC aggregate reports with a 550 relaying denied reply.
# two different questions — two different lines <source 127.0.0.1> always-allow-relaying yes # who can send through us</source> relay-address /^bounce@bounce\./ # for whose addresses we accept mail relay-address /^(dmarc|postmaster|abuse)@/
what people get wrong and how it ends3 mistakes▶
§ 2.3
our experience
§ 2.3
4 relations
Initial configurationThe mechanism this step relies on. § 2.3total-max-smtp-inGlobalBoth are about acceptance: this ceiling decides how many connections the node can handle, relay control what they are allowed to do. inferencealiasGlobalFor a message to reach expansion, the node first has to agree to accept it — that is decided by the acceptance rules. inferenceHow the node selects a source and combines its settingsThe relaying permission is one of the settings this merging decides. § 3.3.7Two inbound report processors and what to do with themReceiving these messages is allowed not by the processor but by the relaying rules. inferencerequire-auth<source>The second way to solve the same question: a right by login instead of a right by address. § 3.3.7.10
grep -n 'always-allow-relaying\|relay-address\|relay-domain' /etc/pmta/config /etc/pmta/virtualhost.txt printf 'HELO test\r\nMAIL FROM:<a@example.com>\r\nRCPT TO:<b@gmail.com>\r\nQUIT\r\n' | nc <node-address> 25
3 articles
◇Headers the sender uses to control deliverySix control headers let the submitting side choose a stream, tag a message with a job, set signing options and the key, the envelope identifier and the schedule; each is allowed separately and per source.◇The load balancer header at the entranceThe node reads the PROXY header at the start of an incoming connection and treats the address from it as the source; this works for both kinds of entry point.◇What the submission bindings needWhat must be in place on the submitting side for the bindings to work: a library, permissions and group membership.