D. J. Bernstein
Internet mail
Internet mail infrastructure
MXPS: the Mail Exchanger Protocol Switch
Normally,
when a client has responsibility to deliver a message to a remote recipient,
it looks up
MX records
and attempts to make
SMTP connections
to each of the addresses it finds.
However, an MXPS client that supports QMTP and sees the MX record
12801 mailin-01.mx.aol.com
will try a QMTP connection to mailin-01.mx.aol.com
before trying an SMTP connection to mailin-01.mx.aol.com.
The point is that QMTP is faster than SMTP.
Here is the general rule.
Particular MX
distances are assigned to protocols as follows:
- 12801, 12817, 12833, 12849, 12865, ..., 13041: QMTP.
If the client supports MXPS and QMTP,
it tries a QMTP connection to port 209.
If the client does not support MXPS or QMTP,
or if the QMTP connection attempt fails,
the client tries an SMTP connection to port 25 as usual.
The client does not try SMTP
if the QMTP connection attempt succeeds
but mail delivery through that connection fails.
Of course, servers are obliged to continue supporting SMTP
for non-MXPS clients,
and clients are obliged to continue supporting SMTP.
In the far future,
if all clients are upgraded to support QMTP,
it will be possible for servers to switch from SMTP to QMTP,
turning off SMTP.
In the farther future,
if all clients support QMTP and all servers have switched from SMTP to QMTP,
it will be possible for clients to drop support for SMTP.
In the short term,
none of these simplifications are possible,
but clients and servers can benefit from the speed of QMTP.
History
I proposed MXPS in the documentation for the first qmail release in 1996.
In the original design,
distances 12801 etc. were assigned to QMTP without an SMTP fallback;
this type of assignment makes sense for potential future QMTP-only servers
but makes current QMTP+SMTP servers unnecessarily difficult to set up.