Knowledge base

domain

<address-list>

A whole domain in an address list
in the configuration this is a linedomaininside the block <address-list>
The same name 1:<address-list><virtual-mta-pool>— some of them are other settings, some are the same one
A domain in full, in one line

The simplest of the five lines: a domain name, and all of its recipients get on the list.

The domain is written in full — example.com, not a pattern or a subdomain mask. For something more flexible there is address with a regular expression.

What this means in practice depends on where the list is plugged in: in suppression — “do not write to this domain at all”; in a processor’s unnamed list — “parse mail from this domain”; in a list of allowed senders — “sending from here is allowed.”

The main trap is subdomains. The line names one domain; example.com does not cover mail.example.com. If you need the whole branch, that is address with a pattern like /@([a-z0-9-]+\.)*example\.com$/.
What the Hub does. It does not write it: in the unnamed lists of the baseline configuration it selects mail with patterns on the local part (/^bounce@bounce\./), not by domain — there are many sending domains on a node, and they change, while the address form stays the same.
Recommended values

The value is the full domain name. When to use this line and when address:

Task With what
one whole domain this line
a domain with all subdomains address with a pattern
one mailbox in a domain address with a full address
the same mailbox in all domains address with a local part
The entry format comes from the manual (§ 3.3.5.5). The note about subdomains and the breakdown by task are ours.
Example configuration
# a whole domain — and next to it a pattern that takes the branch with subdomains
<address-list suppression2>
    domain foo.com    address /@([a-z0-9-]+\.)*bar\.com$/
</address-list>
The first line covers exactly foo.com. The second covers bar.com along with all subdomains: a single domain line cannot express that.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends2 mistakes▶

Expecting a domain to cover its subdomains

§ 3.3.5.5

What it costsexample.com does not match mail.example.com. Some messages go where they were not meant to go, while the list looks configured.
How to spot itSuppression works for the main domain and stays silent for subdomains.
How to do it rightUse address with a pattern that anchors the end of the name: /@([a-z0-9-]+\.)*example\.com$/.

Writing a pattern in the line

our experience

What it costsThe line accepts only a full domain name. Slashes and metacharacters are not parsed here — the rule will match nothing.
How to spot itThe line is there, there are no matches, and no errors either.
How to do it rightWrite patterns in address: it is the only list line that understands them.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
domain <domain>
Values
the full domain name
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<address-list>
How many times
may be repeated
Everything here comes from the manual, with the section.
Inheritance
The line has no inheritance: it applies inside its <address-list> block. What is inherited is the reference to the list — suppression-lists in <source> merges by the source rule, in a pool it goes to the members, and a member’s own line overrides the pool one.
How to check on the node
It is checked, like the whole list, by the refusal that contains the list’s name:
pmtaacctfind --output csv[rcpt,dsnDiag] /var/log/pmta/acct-*.csv
If a subdomain recipient slips past the list, this is not a failure: the line names one domain. A branch needs a pattern in address.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Receiving inbound mail