A message is submitted with an HTTP request, and one request can carry either one recipient or several. The message body can be assembled with substitutions in the mail merge style.
The entry point is assembled from three parts. The <transmissions-api-listener> listener — necessarily with a certificate, because from outside this is HTTPS. The <transmissions-api> block — where the api-key keys and logging settings live. And a source block with the reserved name {transmissions-api}, through which the usual submission settings apply to such mail: permissions for service headers, stream selection and everything else.
Persistent connections are supported per RFC 7230. But with a caveat that catches clients out: every request on such a connection must carry Content-Length, otherwise the response is 400 bad request. The engine does not understand the keep-alive header with its parameters.
The request format is deliberately close to the SparkPost interface — to the point that unsupported fields of that interface are named as the reason for refusal. A client written for SparkPost most often works, and where it does not, it gets a clear refusal.
The other half is compression. A compressed request body is accepted, and the manual immediately advises limiting the maximum message size: without a limit, a compressed request becomes a way to exhaust the node’s memory by decompression.
The Hub does have its own HTTP entry point on the node, but a different one: the web monitor and the management API with the http-api-key key. It is about managing the node, not submitting mail, and the two should not be confused.
# three parts of the entry point: a listener with a certificate, keys and source settings <transmissions-api-listener 1.2.3.4:8585> tls-certificate /etc/pmta/transmissions-api-certificate.pem</transmissions-api-listener> <transmissions-api> api-key 14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf max-message-size 100M </transmissions-api> <source {transmissions-api}> process-x-virtual-mta yes process-x-job yes </source>
what people get wrong and how it ends3 mistakes▶
§ 8.1
§ 8.1.1
§ 8.1
3 relations
grep -n -A4 '^<transmissions-api' /etc/pmta/config
curl -sS -o /dev/null -w '%{http_code}\n' -H 'Authorization: <key>' https://<node-address>:8585/api/v1/transmissions
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.