critical
A node’s configuration can be changed in two ways — with the file and with requests to the configuration API — and the two must not be combined: what was created by a request can only be edited by a request and is not visible in the configuration file.
Every change checks itself: after it the engine reloads the configuration, and if the reload fails the change is rejected and the error is returned in the response. A change either takes effect or does not exist.
API state is stored separately — in /var/lib/pmta/config-api, written at startup and on every reload. A disabled API ignores what was created but does not delete it: enable it again and it comes back.
The file and the configuration API:
| Property | File | Configuration API |
|---|---|---|
| editing | the whole file | per object |
| checking | a separate step | a reload on every change |
| storage | /etc/pmta | /var/lib/pmta/config-api |
| what it covers | everything | address lists and sending addresses with domains |
# enable the configuration API http-enable-api-config yes
4 relations
Reloading settings versus restarting the serviceA related mechanism: they work together. § 8.3
ls -l /var/lib/pmta/config-api/
3 articles
◇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.◇Address lists — named and unnamedA list of addresses, domains, patterns or hashes; a named one is attached by directives such as suppression, an unnamed one lives inside an inbound mail processor.◇Two attachment points — and two different behaviorsA list attached to a source rejects the recipient at submission or bounces the message later; attached to a sending address or pool, it always accepts and then bounces.