On-Demand Mail Relay
Encyclopedia
On-Demand Mail Relay is an SMTP extension standardized in RFC 2645 that allows e-mail
E-mail
Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the...

 to be relayed to the recipient after he has 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 his inbound mail, the customer issues 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 a customer's domain
Domain name
A domain name is an identification string that defines a realm of administrative autonomy, authority, or control in the Internet. Domain names are formed by the rules and procedures of the Domain Name System ....

 (or domains) using SMTP protocol, via the same TCP connection. Since the connection is initiated by the customer, 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
Network address translation
In computer networking, network address translation is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device....

, as done by FASTWEB
Fastweb
FASTWEB S.p.A. is an Italian broadband telecommunications company. It provides voice, Internet, cable television, IPTV and FTTH connection. The cable television and IPTV services were developed by Fastweb themselves as the technology market in 2000 was not mature enough to offer the level of...

 in Italy). Only the ODMR server, referred as the provider, must listen to SMTP connections on a fixed IP address.

External ODMR Support

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.

ODMR transport example

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 (<).

> 220 EXAMPLE.NET on-demand mail relay server ready
< EHLO example.org
> 250-EXAMPLE.NET
> 250-AUTH CRAM-MD5 EXTERNAL
> 250 ATRN
< AUTH CRAM-MD5
> 334
> 235 now authenticated as example.org
< ATRN example.org,example.com
> 250 OK now reversing the connection
< 220 example.org ready to receive email
> EHLO EXAMPLE.NET
< 250-example.org
< 250 SIZE
> MAIL FROM:
< 250 OK
> RCPT TO:
< 250 OK, recipient accepted
...
> QUIT
< 221 example.org closing connection

ODMR clients

  • fetchmail (GPL) works with many protocols, including ODMR; win32 ports require Cygwin
    Cygwin
    Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment...

    : looks like that doesn't support TLS
    Transport Layer Security
    Transport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide communication security over the Internet...

     data exchange (using STARTTLS)
  • xatrn (closed source), win32 only; doesn't support TLS data exchange (using STARTTLS)
  • xODMR (GPL), portable (pure Python), works fine with TLS.

ODMR servers

  • odmrd (GPL) Implementation of ODMR server written in Perl
    Perl
    Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

    .
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK