<rewrite-list>set by the Hub
A line of two addresses: what we replace and with what. What changes is the envelope — the address of the MAIL FROM command, invisible to the recipient; bounces arrive at it, and the receiving server checks SPF against it.
The asterisk means different things on the left and on the right. On the left it is “match anything,” on the right — “take from the original address.” mail-from foo@* *@bar.com turns foo@xyz.com into foo@bar.com: the local part stays its own, the domain is substituted.
An empty address is written as <> — that is what the envelope of a delivery report looks like. It can be caught on the left and set on the right; only one thing is not allowed: an asterisk on the right when the left is empty — there is nothing to take from an empty address.
The target address must be ASCII. A domain like bücher.de is not allowed on the right side.
The forms of the left and right sides — and this is the manual’s most useful table:
| Left (what we catch) | Matches |
|---|---|
| abcd@xyz.com | exactly this address |
| abcd@* | this local part in any domain |
| *@xyz.com | any address in this domain |
| *@* | everything except the empty one |
| <> | the empty envelope address |
| Right (what we replace with) | Result |
|---|---|
| abcd@xyz.com | exactly this address |
| abcd@* | this local part, the domain from the original |
| *@xyz.com | the local part from the original, this domain |
| <> | the empty address |
What to write in a fleet. *@<domain> bounce@bounce.<domain> — one rule per sending domain: bounces are collected on their own subdomain and can be analyzed by the original recipient’s domain.
# the envelope goes to its own bounce subdomain — one rule per domain <rewrite-list mta-hub-return> mail-from *@shop.example.com bounce@bounce.shop.example.com mail-from *@news.example.com bounce@bounce.news.example.com </rewrite-list>
what people get wrong and how it ends3 mistakes▶
our experience
§ 3.3.18.1
§ 3.3.18.1
3 relations
pmtaacctfind --output csv[orig,rcpt,vmta] /var/log/pmta/acct-*.csv | head -20
3 articles
◇Two inbound report processors and what to do with themBounces by message and complaints are parsed by two identically structured blocks; each has its own address list and its own pair of decisions about the message’s fate.◇A return address with the recipient written into itThe bounce arrives at a unique address, and there is no need to parse its content.◇What to return in a bounce reportWhat to enclose in a bounce report: the whole message or only its headers.