<source>
The form and the rules are the same as at the node level: a path, a mask or an HTTP address. What changes is the substitution place — the lines are read as settings of this <source> block, not of the node.
It can be repeated — the manual shows two lines in a row, a file and an address.
The practical meaning here is slightly different than at the node level. Sources differ between nodes more often than anything: each has its own submission subnets and its own permissions. Moving this part into a separate file is the most obvious way to keep the shared template and the local differences apart.
Three forms of the value, as at the node level:
| Value | When |
|---|---|
| a file path | node differences are moved out separately |
| a mask | a set of files in one line |
| an HTTP address | source settings are distributed centrally |
The file must contain lines allowed in <source>. There is no “is this the right thing” check before applying: a mismatch will surface as a configuration parse error.
# node differences are moved out of the shared template <source 0/0> include /etc/pmta/sourcecfg.txt include http://10.1.2.3:4000/my/source/config </source>
what people get wrong and how it ends2 mistakes▶
§ 3.3.7.74
our experience
1 relation
includeGlobalThe same directive at the root of the file; there it adds node-level lines. § 3.3.1.53
grep -n -A20 '<source' /etc/pmta/config | grep -i 'source\|include'
3 articles
◇Who is allowed to submit mail and for whom to accept itOut of the box, the node accepts submission only from the machine itself; two different questions — “who can send through us” and “for whose addresses we accept mail” — are answered by different directives.◇The group that grants management rightsMembership in the pmta group gives an unprivileged user the right to call the node’s commands and use submission.◇How the node selects a source and combines its settingsA connection falls under all source blocks whose addresses cover it, and they act merged — the narrow one overrides the wide one; named blocks are attached only by direct reference.