The submission method is the same in all bindings: open a connection to the node, create a message, create recipients and attach them to the message, add headers and a body, hand it over for sending. Everything else in the chapter is a property of one of these three objects.
And the chapter is best read exactly that way. The object a setting belongs to tells you what it applies to: a message setting applies to all its recipients, a recipient setting to one person. The question “why did it turn out differently for one recipient” is almost always answered by the level at which the setting was set.
The manual is honest about the benefit. Bindings are not faster than a regular SMTP connection — except for merging, when there are several recipients per message. That is, they are chosen for personalization and control over an individual message, not for speed.
The transport is a modified SMTP, so submission can be local or remote; this makes no difference to the model.
The main point for those who do not use bindings: the same decisions are available over regular SMTP too — through the message’s control headers (control-headers). Knowing what the submitting system is entitled to decide is useful even if the bindings themselves are not needed.
But it does use control headers: X-Virtual-MTA with the sending address name is added to the message, and other headers when needed. This is exactly what this entry is about — the submitting side makes the decision, it is just expressed as a header rather than a binding call.
So the entry is useful to us as well: knowing what the submitting system is entitled to decide carries over from bindings to headers unchanged.
The model has no values of its own — it has levels at which a setting is set:
| Level | What it applies to | Example decision |
|---|---|---|
| connection | everything submitted through it | which node and under which login |
| message | all of the message’s recipients | sending address, job, encoding |
| recipient | one person | merge variables, notifications |
The selection rule is simple: the lower the level, the more expensive. A recipient setting means the message cannot be transmitted to everyone at once in one transfer. If there is no personalization, everything possible should be set at the message level.
The same is available over SMTP — via control headers, and with the same caution: a header left in the message will travel to the recipient. Headers that the node must not let out are removed by a submission block setting.
# the same decision two ways: via a binding and via a header # binding: a message property # msg.setVirtualMTA("mta-news-1") # regular SMTP: the same choice with a control header X-Virtual-MTA: mta-news-1X-Job: campaign-4417
what people get wrong and how it ends3 mistakes▶
§ 7
§ 7
§ 7
3 relations
C++ submission APIA related mechanism: they work together. § 7.4Perl submission APIThe same setting at another level. § 7.2Java submission APIThe same setting at another level. § 7.3.NET submission APIThe same setting at another level. § 7.6Submission over HTTPS on its own listener, modeled on SparkPostAnother way to pass the same thing: there the SMTP protocol, here an HTTP request with a JSON body. § 8.1
grep -m5 'campaign-4417' /var/log/pmta/acct*.csv pmta show jobs
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.