<transmissions-api>
The line sets a key for applications that submit mail through the Transmissions API. The application passes it in the Authorization header, and with a valid key gets the right to use this entry point.
The directive is repeated — any number of times, one line per key. This is the way to give different keys to different applications and revoke one without touching the others.
The manual sets a strict requirement for the value: letters, digits and underscore, from 32 to 128 characters long.
The key sits in the configuration in plain text — like submission passwords. So the file has to be protected accordingly.
It is the same story as with login passwords, and the cost of the mistake is the same: separation that exists only on paper.
The key the Hub does write out is a different one: http-api-key for the web monitor and the management HTTP API. They are easy to confuse by name, but they are different entry points with different rights.
What to set. The value is the key itself; the rules come from the manual’s requirement and from common sense:
| Property | Why |
|---|---|
| 32–128 characters, letters, digits, underscore | the engine’s requirement: it will not accept anything shorter or with other characters |
| random | the key is passed in a header and sits in the file in the clear |
| one per application | otherwise revoking one access stops them all |
The block should have as many lines as there are submitting applications — this is not redundancy but the only way to revoke.
# a key per application — otherwise revoking one stops them all <transmissions-api> api-key 14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf api-key 476d2e5b1d2bad079bf14ac5499cfdd2bb2859e4 </transmissions-api>
what people get wrong and how it ends3 mistakes▶
§ 3.3.20.1
§ 3.3.20.1
our experience
2 relations
grep -c '^ *api-key ' /etc/pmta/config ls -l /etc/pmta/config
3 articles
◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.◇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.◇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.