Knowledge base

Mail merge via SMTP extensions

mailmerge SMTP extensions
The same merge without a binding

SMTP extensions used to submit a mail merge over an ordinary mail connection, without a binding.

Three commands: XMRG replaces MAIL FROM and keeps its extensions — DSN, VERP; XDFN sets variables for the recipient that follows, as name=value pairs; XPRT replaces DATA and transfers one part — with a number, and the last one marked LAST.

A part is transferred as with DATA: with dot escaping and a dot on a separate line at the end.

The main trap is forgetting LAST. Only the part with this mark completes the submission: without it the node waits for the next XPRT, and the message does not go out.
What the Hub does. Not used: warm-up messages are submitted over ordinary SMTP, one per recipient.
Recommended values

Three commands:

Command Replaces What it does
XMRG MAIL FROM sender and extensions
XDFN — variables for the next recipient
XPRT DATA one part; the last one with LAST
The three commands, their order and the last part’s mark come from the manual (§ 11.19.5.2). The table is ours.
Example configuration
XMRG FROM:<travelAlerts@example.port25.com> VERP
XDFN FName="Bob" *parts=1,3
RCPT TO:<bob@example.port25.com>
XPRT 1
A shortened example from the manual: after a part’s text comes a dot on a separate line; the last part is XPRT 3 LAST.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
How to check on the node
Check whether mail merge is allowed for the source:
grep -rn 'allow-mailmerge' /etc/pmta/
Merge commands are accepted only from a source with allow-mailmerge.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Address warm-up · Connect a sending platform