On-Demand Mail Relay (ODMR) is an SMTP extension standardized in that allows e-mail to be relayed to the recipients after they have been authenticated. It uses the extended SMTP command ATRN
, similar to the ETRN
command but available for dynamically assigned IP addresses.
ODMR works in the following way: to check their inbound mail, customers issue EHLO
and AUTH
commands to the ODMR service, followed by ATRN
command (Authenticated TuRN); after a successful ATRN
command the ODMR server begins to act as an SMTP client and starts to send all messages directed to the customer's domain (or domains) using SMTP protocol, via the same TCP connection. Since connections are initiated by customers, this protocol works well for machines having dynamically assigned IPs and/or are firewall protected (i.e. your ISP may block incoming connection on port 25 or may use NAT). Only the ODMR server, referred as the provider, must listen to SMTP connections on a fixed IP address.
The design of ODMR allows the protocol to be used with an SMTP server that doesn't support it natively. A separate application can be used to do the initial ODMR protocol negotiation (EHLO
, AUTH
and ATRN
), then hand over the connection to the SMTP server once the protocol has reached the "reversed" state.
A typical example of getting emails with ODMR.
For illustration purposes here (not part of protocol), the protocol exchanges are prefixed for the server (>) and the client (<).