Internet Draft
Category: Experimental                                         G. Fecyk
Document: draft-fecyk-dsprotocol-02.txt        Pan-Am Internet Services
Expires: September 2003                                      April 2003


                        Designated Mailers Protocol
          A Way to Identify Hosts Authorized to Send SMTP Traffic


Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC 2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six
   months and may be updated, replaced, or obsoleted by other documents
   at any time.  It is inappropriate to use Internet-Drafts as
   reference material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
        http://www.ietf.org/ietf/1id-abstracts.txt
   The list of Internet-Draft Shadow Directories can be accessed at
        http://www.ietf.org/shadow.html.


Changes Since Last Revision

   This author does not expect additional changes to the design, and
   further revisions will only reflect bug-fixes or clarifications.
   Readers are encouraged to implement this Protocol for testing.

   Throughout the document, added new DNS nodes for different transport
   protocols.  Introduced the nodes "in-addr" and "ip6" so-named for
   their nodes in the arpa domain.  DMP is now extensible to any
   transport that supports address-to-name mapping through DNS.

   5. Changed the TXT RR values to "dmp=deny" and "dmp=allow", similar
   but not identical to RFC 1464, which describes a way to store
   arbitrary string values using TXT RR records.  The values for were
   chosen for their English meanings.

   Throughout this document, renamed the Protocol to "Designated
   Mailers Protocol" and changed the acronym for the Protocol to "dmp"
   to avoid confusion with record types available in DNSSEC.


Fecyk                  Expires - September 2003               [Page 1]


                     Designated Mailers Protocol           April 2003


   Throughout the document, changed DNS node used for the Protocol to
   "${addr-type}._smtp-client". This avoids conflicts and confusion
   with SRV RR records.

   5. Template, description and examples rewritten to use TXT RR
   records instead of A RR records.

   6. Protocol Flowchart redesigned to demonstrate changes to the
   Protocol.  Of most import: Only one Protocol lookup is now required
   in all cases.

   7 and 9. Example SMTP Conversations changed to accommodate changes
   to Protocol, Template and Record Type use.

   8. An additional mail forwarding problem, Source Routing, is
   described.


Abstract

   This document describes a proposed standard for identifying host
   computer systems designated as Simple Mail Transfer Protocol (SMTP)
   clients for an Internet domain or host through Domain Name System
   (DNS).  This identification allows SMTP servers to verify if a
   connecting client is allowed to make outgoing SMTP connections on
   behalf of the client's domain.

Conventions used in this document

   In examples, "C:" and "S:" indicate lines sent by the client and
   server respectively.

   In examples, the domain name "example.net" represents a fictional
   domain receiving SMTP communications with servers, and "example.com"
   represents a fictional domain transmitting SMTP communications with
   clients.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in
   this document are to be interpreted as described in RFC 2119 [1].

Table of Contents

   1. Introduction...................................................3
   2. Why Identify Sending Hosts as well as Receiving Hosts..........4
      2.1 Junk E-mail................................................4
      2.2 Viruses and Worms..........................................4
      2.3 Account Fraud..............................................4


Fecyk                  Expires - September 2003               [Page 2]


                     Designated Mailers Protocol           April 2003

      2.4 "Joe-Jobbers"..............................................4
   3. What Participating in the Designated Mailers Protocol does NOT
   Prevent...........................................................5
      3.1 Junk E-mail with Correct Envelope Information..............5
      3.2 "Joe-Jobbing" Within the Same Domain.......................5
      3.3 Viruses and Worms using the Infected Party's SMTP Server...5
   4. Background.....................................................6
   5. Designating SMTP Clients.......................................6
      5.1 By Internet Protocol v4 (IPv4) Address.....................8
      5.2 Example Designations by IPv4 Address.......................8
      5.3 By Internet Protocol v6 (IPv6) Address.....................9
   6. Protocol Flowchart............................................10
   7. Example SMTP Conversations....................................11
   8. Mail Forwarding...............................................13
      8.1 Authorized Mail Relay.....................................13
      8.2 Secondary Mail Exchangers.................................14
      8.3 Mailing List Servers......................................14
      8.4 Mail Forwarding such as .forward files on *ix systems.....15
      8.5 SMTP Source Routing.......................................15
   9. Accepting Mail from the Null Sender Envelope: MAIL FROM:<>....15
   10. Security Considerations......................................16
      10.1 DNS Security.............................................16
      10.2 Mail Transfer Agent Security.............................16
      10.3 DNS Outages..............................................17
      10.4 Answering RFC 2821 7.1: Mail Security and Spoofing.......17
   11. References...................................................17
   12. Acknowledgments..............................................18
   13. Author's Addresses...........................................18
   14. Full Copyright Statement.....................................19

1. Introduction

   My ultimate goal in fighting junk e-mail is bringing accountability
   back to its senders.  With accountability, spammers must answer for
   their e-mail abuse or stop sending junk e-mail. My first and most
   successful attempt at doing so was the Orca DUL Project.

   Even with projects like these and many others, spammers continued to
   find ways to avoid accountability.  This document is my latest
   attempt to restore it, and with accountability restored, strengthen
   the myriad of anti-spam measures, policies and projects already
   available.

   This author wants to remind readers that implementing and using the
   Designated Mailers Protocol is entirely OPTIONAL and NOT REQUIRED to
   operate SMTP services.  Also, readers are reminded that recipients
   have the right to refuse any communication from anyone.




Fecyk                  Expires - September 2003               [Page 3]


                     Designated Mailers Protocol           April 2003

2. Why Identify Sending Hosts as well as Receiving Hosts

   You want to identify your outgoing SMTP hosts so you can effectively
   audit e-mail sent in the name of your domain.  While it is still
   possible to send authorized e-mail and still be abusive, it becomes
   far easier to audit the abuse and identify the senders.

2.1 Junk E-mail

   "Spammers," not wishing be identified or have their abused resources
   identified, routinely falsify their e-mail's sender information,
   including Sender Envelope (MAIL FROM: envelope), From: header and
   Reply-To: header. Spammers often impersonate large, popular domains
   such as hotmail.com[tm] when they do this.  If such domains
   participated in this Protocol, other participating domains would not
   receive junk e-mail from spammers falsifying their sender
   information.

   Recipients using the Protocol could reject any e-mail sent in this
   manner, regardless of how a resource is exploited.  This includes
   open relay, insecure proxy, dynamic IP, insecure and unrelated
   resources such as older Formmail versions, and yet-undiscovered
   exploits.

2.2 Viruses and Worms

   While many viruses use the infected machine's sender address, those
   same viruses rarely use the sender domain's resources to send copies
   of itself, instead running their own SMTP engines.

   Domains participating in this Protocol may reject copies of viruses
   sent in this manner.

2.3 Account Fraud

   Members of both financial institutions such as PayPal, and non-
   financial account maintainers such as America On-Line, routinely
   receive communication from confidence-artists and scammers
   falsifying the membership host's domain in their e-mail.  They do
   this to entice the recipients into divulging critical account
   information to the scam artist.

   Account maintainers participating in this Protocol can discourage
   would-be scam artists from falsifying their domain, as participating
   recipients may reject e-mail from them.

2.4 "Joe-Jobbers"




Fecyk                  Expires - September 2003               [Page 4]


                     Designated Mailers Protocol           April 2003

   People wishing to harm other people on the Internet often falsify a
   specific person's e-mail address to direct blame on that other
   person.  The first well-known instance of this abuse put the domain
   joes.com out of business, hence the phrase "Being Joe'd" or "Joe-
   Jobbing."

   Domains participating in this Protocol could greatly diminish their
   chances of being "Joe'd," as participating recipients could reject
   such e-mail.


3. What Participating in the Designated Mailers Protocol does NOT
   Prevent

   Designated Mailers Protocol addresses a specific e-mail problem, and
   does not stop "authorized" abuse.  It does, however, make
   "authorized" abuse far easier to track.

3.1 Junk E-mail with Correct Envelope Information

   The Protocol would not stop a spammer from using envelope
   information they are authorized to use.  However, maintainers of a
   spammer's domain could audit their activity more effectively, as the
   spammer is forced to use their correct information.

   If spammers maintain their own domains, domain-based blocking
   becomes more effective.  In extreme cases, where a spammer hosts
   multiple domains, blocking the authoritative DNS servers for the
   spammer's domains becomes very effective, as the recipient could
   reject all Protocol lookups on the spammers' DNS servers. They would
   effectively reject all e-mail from domains hosted there.

3.2 "Joe-Jobbing" Within the Same Domain

   If a user on example.com wanted to falsify e-mail coming from
   someone else within example.com, the Protocol would still allow for
   it, since the sender envelope information would be correct.
   However, maintainers of said domain could audit this e-mail and
   identify the sender.

3.3 Viruses and Worms using the Infected Party's SMTP Server

   If a user's computer runs such a virus that, instead of using its
   own SMTP engine, uses their outgoing mail server, using the Protocol
   would not stop it.  However, domain maintainers could audit this e-
   mail and identify the user with the infected computer.





Fecyk                  Expires - September 2003               [Page 5]


                     Designated Mailers Protocol           April 2003

4. Background

   At least one similar document [2] describes identifying outgoing
   SMTP hosts by name using SRV RR records, and defines the sub-domain
   "_CLIENT._SMTP._TCP". [4] However, there was no quick way to use the
   sending host's IP address in the query.  As the connecting IP
   address is the most readily available bit of information we have on
   a host, I propose using it, instead, in the query to see if it is a
   designated SMTP mailer.

   Many anti-spam projects use a variant of the addressing scheme
   employed by the IN-ADDR.ARPA domain, where a name record for a given
   IPv4 address may be found by querying each dotted-quad value as a
   sub-domain.  For example, we should find a PTR RR record in the IN-
   ADDR.ARPA domain for 192.168.0.1 here:

      1.0.168.192.in-addr.arpa.

   Anti-spam projects using IN-ADDR.ARPA-like naming to identify
   addresses to avoid receiving SMTP communication, do so by creating A
   RR records, and use an otherwise meaningless value for the A RR
   itself:

      1.0.168.192.evil-spammers-list.example.com. A xxx.xxx.xxx.xxx

   A subscriber to this project would look up 192.168.0.1 by querying
   this name for a valid A RR record.  If it found one, it would refuse
   further SMTP connectivity from there.

   The Designated Mailers Protocol defines a unique set of IN-
   ADDR.ARPA-like records in a special name space, modeled from RFC
   2782, to identify a domain as a participant of the protocol.  It
   further defines a way to identify the addresses that are designated
   to make SMTP connections on behalf of the sender's domain or host.


5. Designating SMTP Clients

   All domains participating in DMP set up TXT RR records in a sub-
   domain called "_smtp-client".  The first is a placeholder which
   provides a default DMP lookup response for the domain.  This record
   MUST be present in a domain participating in DMP:

   ;REQUIRED: DMP Placeholder and default record
   *._smtp-client.${DOMAINNAME}. TXT "dmp=deny"

   Additional records are OPTIONAL and identify the network hosts
   designated as SMTP clients:



Fecyk                  Expires - September 2003               [Page 6]


                     Designated Mailers Protocol           April 2003

   ;OPTIONAL: DMP records
   ${ADDRESS}.${ADDR-TYPE}._smtp-client.${DOMAINNAME}. TXT "dmp=allow"

   ${ADDRESS} represents a network address in inverse form as used in
   the "arpa" node.  For instance, IPv4 addresses are represented as
   they are in the in-addr.arpa node, IPv6 addresses are represented as
   they are in ip6.arpa.  ${ADDR-TYPE} represents the address type as
   already used in the "arpa" node, such as "in-addr" for IPv4 and
   "ip6" for IPv6.  ${DOMAINNAME} represents the right-hand side of a
   SMTP mail sender envelope as used in the MAIL FROM: command.  For
   example, the sender envelope "user@example.com" has a right-hand
   side of "example.com".  If there is no domain part in a sender
   envelope, or the domain is "localhost", no DMP lookup is needed as
   it is a local delivery.

   Using inverse addresses in the zone records allows us to use
   wildcards in the records, reducing the number of records needed for
   a large bank of SMTP clients.

   The TXT RR record was chosen for its flexibility.  TXT RR records
   are supported by all DNS server software.  DMP uses the text strings
   "dmp=deny" and "dmp=allow" to identify clients designated, or not
   designated, to transmit SMTP.  The values were selected for their
   English meanings.  The record strings are case-insensitive, so
   "DMP=ALLOW" is the same as "dmp=allow".

   Software designed to look up RFC 1464 [8] type records may be used
   to look up DMP records, but ANY algorithm that looks up TXT RR
   records will work.  For example, a function written in C to RFC
   1464's example would have the following parameters:

   snprintf(dmpRecordName, bufsize, "%s.in-addr._smtp-client.%s",
   reversedIP, domainName);
   getattributebyname(dmpRecordName, "dmp", result, bufsize);

   A lookup will generate one of four results:

     - A successful retrieval of a TXT RR record from a valid DMP
     domain node, and a value of "dmp=allow" indicating the connecting
     IP is a Designated Mailer for the domain,
     - A successful retrieval of a TXT RR record from a valid DMP
     domain node, and a value of "dmp=deny" indicating the connecting
     IP is NOT a Designated Mailer for the domain,
     - A permanent error, either NXDOMAIN, CNAME only, multiple
     conflicting DMP records or non-DMP TXT RR record retrieved,
     indicating the domain in the MAIL command does not participate in
     the Protocol, or
     - A temporary error, or failure to retrieve a record (SERVFAIL).



Fecyk                  Expires - September 2003               [Page 7]


                     Designated Mailers Protocol           April 2003

   Participating servers MUST distinguish between all four possible
   results.  Notably the last result (SERVFAIL) is a temporary error
   and not a permanent one, and a subsequent lookup of the same record
   may succeed.

   A participating domain MUST have one TXT RR record indicating they
   participate in the Protocol, and that record MUST have the default
   DMP attribute of "deny":

   *._smtp-client.${DOMAIN_NAME}. TXT "dmp=deny"

   A participating domain MAY have NO additional Designated Mailer
   records, thereby indicating no SMTP traffic will originate from
   their domain.  The default of "deny" ensures that any lookups for
   non-designated mailers will return this value.

   This author understands that site administrators will want to permit
   SMTP client connections from any host on a network.  If a site
   administrator insists on doing this, the site MUST have its default
   "allow" record set per address type:

   *.${ADDR-TYPE}._smtp-client.${DOMAINNAME}. TXT "dmp=allow"

   Site administrators really, really SHOULD NOT do this, and instead
   SHOULD designate their own hosts and networks.  It is not difficult
   to add and remove DMP records for dynamically addressed hosts,
   testing hosts, temporary relays, third-party relays and so on.

5.1 By Internet Protocol v4 (IPv4) Address

   A host or domain participating in Designated Mailers would create
   TXT RR records in their DNS zone with this template [3]:

   ;REQUIRED: DMP placeholder and default record
   *._smtp-client.${DOMAINNAME} TXT "dmp=deny"
   ;OPTIONAL: DMP records
   ${REVERSEDIP_1}.in-addr._smtp-client.${DOMAINNAME}. TXT "dmp=allow"
   ${REVERSEDIP_2}.in-addr._smtp-client.${DOMAINNAME}. TXT "dmp=allow"
   [...]
   ${REVERSEDIP_N}.in-addr._smtp-client.${DOMAINNAME}. TXT "dmp=allow"

   ${REVERSEDIP_N} represents the IPv4 address in reverse-dotted-quad
   order.  For example, the IPv4 address 192.168.0.1 would become
   "1.0.168.192" in reverse-dotted-quad order, as used in IN-ADDR.ARPA.

5.2 Example Designations by IPv4 Address





Fecyk                  Expires - September 2003               [Page 8]


                     Designated Mailers Protocol           April 2003

   Here is an example portion of a DNS zone file for example.com, where
   the hosts at IPv4 addresses 192.168.0.10 and 192.168.1.110 are the
   Designated Mailers for example.com:

   $ORIGIN example.com.
   *._smtp-client TXT "dmp=deny"
   10.0.168.192.in-addr._smtp-client TXT "dmp=allow"
   110.1.168.192.in-addr._smtp-client TXT "dmp=allow"

   Here is an example of example.com designating a rack of load-
   balancing hosts in the network of 192.168.1.0/24 as Designated
   Mailers:

   $ORIGIN example.com.
   *._smtp-client TXT "dmp=deny"
   *.1.168.192.in-addr._smtp-client TXT "dmp=allow"

   Here is an example of example.com stating that no SMTP traffic will
   originate from their domain:

   $ORIGIN example.com.
   *._smtp-client TXT "dmp=deny"

   Finally, here is an example of a stand-alone host with its own Fully
   Qualified Domain Name, "lonehost.example.com":

   $ORIGIN example.com.
   lonehost A 192.168.0.1
   *._smtp-client.lonehost TXT "dmp=deny"
   1.0.168.192.in-addr._smtp-client.lonehost TXT "dmp=allow"

   Alternately:

   $ORIGIN lonehost.example.com.
   @ A 192.168.0.1
   *._smtp-client TXT "dmp=deny"
   1.0.168.192.in-addr._smtp-client TXT "dmp=allow"

5.3 By Internet Protocol v6 (IPv6) Address

   We can trivially extend the Protocol to identify authorized IPv6
   addressed hosts.  The template for identifying IPv6 hosts as
   Designated Mailers is identical to the template for IPv4, only using
   reversed IPv6 addresses as part of the record names.

   ;Required: DMP placeholder and default record
   *._smtp-client.${DOMAINNAME} TXT "dmp=deny"
   ;Optional: DMP records
   ${REVERSIPv6_1}.ip6._smtp-client.${DOMAINNAME}. TXT "dmp=allow"


Fecyk                  Expires - September 2003               [Page 9]


                     Designated Mailers Protocol           April 2003

   ${REVERSIPv6_2}.ip6._smtp-client.${DOMAINNAME}. TXT "dmp=allow"
   [...]
   ${REVERSIPv6_N}.ip6._smtp-client.${DOMAINNAME}. TXT "dmp=allow"

   ${REVERSIPv6_N} represents a reverse nybble of the IPv6 address as
   used in ip6.arpa.  For instance, The IPv6 address
   2345:00C1:CA11:0001:1234:5678:9ABC:DEF0 becomes
   "0.F.E.D.C.B.A.9.8.7.6.5.4.3.2.1.1.0.0.0.1.1.A.C.1.C.0.0.5.4.3.2".

   The remainder of this document will use IPv4 addressing and records
   in its examples.  Aside from the template, the actions for IPv6
   participants are identical to that of IPv4 participants.


6. Protocol Flowchart

   The flowchart starts when the client issues the MAIL command.  It
   ends with an acknowledgement or error before the client issues the
   RCPT command.


   ====================================
   | Client issues MAIL FROM: command |
   ====================================
             |
   =============================================================
   | Server checks local Allow and Auth rules on connecting IP |
   =============================================================
             |
       =============================
       | Allowed or Authenticated? |-------Yes------------|
       =============================                      |
             |                                      ============
             No                                     | 250 OK   |
             |                                      | Resume   |
             |                                      | Normally |
             |                                      ============
   =======================================
   | Server performs DMP Protocol lookup |
   =======================================
             |
       =============
       | Response? |-----------|---------------|---------------|
       =============           |               |               |
             |                 |               |               |
         Success            Success      NXDOMAIN or       SERVFAIL
     Valid DMP Record   Valid DMP Record Not Valid DMP or      |
        "dmp=allow"        "dmp=deny"    No TXT RR Record      |
             |                 |               |               |


Fecyk                  Expires - September 2003              [Page 10]


                     Designated Mailers Protocol           April 2003

             |                 |               |               |
             |                 |      ================  ===============
             |                 |      | Do I accept  |  | Do I accept |
             |                 |      | mail from    |  | mail from   |
             |                 |      | non-DMP site?|  | (possibly)  |
             |                 |      |              |  |non-DMP site?|
             |                 |      ================  ===============
             |                 |               |               |
             |                 |    |----------|    |----------|
             |                 |    |          |    |          |
             |                 |    No        Yes  Yes         No
             |                 |    |          |    |          |
         ===========      =============    ===========   ==============
         | 250 OK  |      | 550 ERROR |    | 250 OK  |   | 451 ERROR  |
         | Resume  |      | Need DMP  |    | Resume  |   | Cannot see |
         | Normally|      | Records   |    | Normally|   | DMP records|
         ===========      =============    ===========   ==============

   Designated Mailers Protocol uses error code 550 for a permanent
   error, indicating a policy reason, and 451 for a temporary error,
   indicating a local processing error.  Error code 451 is the only
   temporary error response allowed to the MAIL command. [5]

   The last draft required two Protocol lookups - one to verify if the
   client IP was designated, and the second (if the first failed) to
   see if the domain participates.  This second lookup is no longer
   required.

   Participating servers MAY bypass the Protocol altogether for chosen
   addresses, for instance, their "allow relay" list for client IPs, or
   for client IPs running a Mail User Agent that supports some form of
   authentication for sending e-mail.  Example authentication protocols
   include POPAUTH, SMTP AUTH, client certificates and so on.  Doing
   this avoids requiring dynamically created records for dial-up users
   and roaming users.

   When a non-participating client connects to a participating server,
   it SHOULD respond as though the Protocol didn't exist.  However, as
   the Protocol gains acceptance, it MAY respond as its operators wish.
   For instance, the server MAY refuse e-mail until the senders
   participate in the Protocol, or accept the message and include
   additional headers in the message to inform the recipient.


7. Example SMTP Conversations

   These examples introduce new error conditions in the SMTP or ESMTP
   protocol after the MAIL command.  RFC 2821 section 4.3.2 states this
   is allowed. [5]


Fecyk                  Expires - September 2003              [Page 11]


                     Designated Mailers Protocol           April 2003


   An example of a successful SMTP session between hosts in
   participating domains:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO clientmachine.example.com
   S: 250 mail.example.net Hello clientmachine.example.com
   [192.168.0.1]
   C: MAIL FROM:<user@example.com>
   (server looks up 1.0.168.192.in-addr._smtp-client.example.com and
   receives "dmp=allow")
   S: 250 OK client at 192.168.0.1 verified as authorized sender for
   example.com
   [resume normally]

   An example of a rejected (NXDOMAIN) session from an undesignated
   host claiming to be part of a participating domain to a
   participating host:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO not-clientmachine.example.com
   S: 250 mail.example.net Hello not-clientmachine.example.com
   [192.168.1.1]
   C: MAIL FROM:<user@example.com>
   (server looks up 1.1.168.192.in-addr._smtp-client.example.com and
   receives "dmp=deny")
   S: 550 ERROR client at 192.168.1.1 is not a Designated Mailer for
   example.com
   C: RCPT TO:<receipient@foo.bar>
   S: 550 ERROR must issue MAIL FROM: command first
   C: DATA
   S: 554 ERROR must issue MAIL FROM: and RCPT TO: first

   An example of a rejected (NXDOMAIN) session from a host belonging to
   a non-participating domain, where the participating server acts as
   though the protocol didn't exist:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO not-clientmachine.example.com
   S: 250 mail.example.net Hello not-clientmachine.example.com
   [192.168.1.1]
   C: MAIL FROM:<user@example.com>
   (server looks up 1.1.168.192.in-addr._smtp-client.example.com and
   returns NXDOMAIN)
   S: 250 OK, mail from user@example.com.
   [resume normally]





Fecyk                  Expires - September 2003              [Page 12]


                     Designated Mailers Protocol           April 2003

   An example of a rejected (NXDOMAIN) session from a host belonging to
   a non-participating domain, where the participating server refuses
   SMTP traffic from non-participating domains:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO not-clientmachine.example.com
   S: 250 mail.example.net Hello not-clientmachine.example.com
   [192.168.1.1]
   C: MAIL FROM:<user@example.com>
   (server looks up 1.1.168.192.in-addr._smtp-client.example.com and
   returns NXDOMAIN)
   S: 550 ERROR cannot verify 192.168.1.1 as sender for example.com.

   An example of a failed (SERVFAIL) session from a host belonging to,
   possibly, a non-participating domain, where the participating server
   refuses SMTP traffic from, possibly, non-participating domains:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO not-clientmachine.example.com
   S: 250 mail.example.net Hello not-clientmachine.example.com
   [192.168.1.1]
   C: MAIL FROM:<user@example.com>
   (server looks up 1.1.168.192.in-addr._smtp-client.example.com and
   returns SERVFAIL)
   S: 451 ERROR cannot verify 192.168.1.1 as sender for example.com at
   this time.

   A DNS outage may be responsible for a SERVFAIL response.  For this
   reason, participating servers MUST use a 451 error message
   indicating a temporary failure, and not a 550 series message
   indicating a permanent failure, when any lookup returns SERVFAIL.
   This is a separate and distinct condition from where the server can
   determine (through a NXDOMAIN response) that the client is not from
   a participating domain.


8. Mail Forwarding

   Mail forwarding without altering the sender envelope in the MAIL
   command becomes difficult with the Designated Mailers Protocol.  The
   host acting as the forwarding agent rarely is a Designated Mailer
   for the sender's domain.  This section covers how to accommodate
   mail forwarding under the Protocol.

8.1 Authorized Mail Relay

   Most mail user agents (MUAs) use an external SMTP server as a relay
   agent or "outgoing mail server." The MUA's IP address is almost
   never a Designated Mailer for the sender's domain.


Fecyk                  Expires - September 2003              [Page 13]


                     Designated Mailers Protocol           April 2003


   The relaying MTA only has to use their "Allow Relay" list or an
   authentication mechanism to permit SMTP traffic from the MUA, as is
   accepted practice. [6] Hosts running MUAs do not need their own DMP
   records if they use a relay or smart host that has them.

8.2 Secondary Mail Exchangers

   Larger Internet providers use a network of peer mail exchangers and
   directly inject e-mail from the peer into their internal mail
   system, so these are largely unaffected.  Smaller providers use a
   single Primary host and one or more Secondary hosts as relays to the
   Primary, and the Secondary is almost never a Designated Mailer for a
   sender's domain.

   Participants in the Protocol that use Secondary mail exchangers can
   use one of several ways to accept mail from their Secondary hosts
   again.  Here are two possibilities:

     - Add the Secondary host's IP address to the Primary's "Allow
     Relay" list, similar to 8.1 above.
     - Program the Secondary to alter the sender envelope, and
     designate the Secondary as a Designated Mailer for itself, similar
     to 5.2 above.  An altered sender envelope could contain the
     original sender's information, for instance including the original
     sender envelope directly:

     MAIL FROM:<originalsender(at)example.com@secondarymx.example.net>

     ...or encode the original sender into the new sender envelope
     somehow, such as with a two-way hash:

     MAIL FROM:<236FA24C@secondarymx.example.net>

   Whatever method is used, a Secondary MUST return mail back to the
   sender if the Primary rejects it.

   This author understands that most MTAs relaying as a Secondary do
   not modify the sender envelope.  While modifying the envelope is
   more secure, adding a Secondary to the Primary's "allow" list is
   acceptable.

8.3 Mailing List Servers

   Some list server implementations use the original envelope sender
   when forwarding mail from a sender to the list members, but most
   modern list software alters or replaces the sender envelope somehow.
   For example, list software uses the list-owner address in the sender
   envelope.


Fecyk                  Expires - September 2003              [Page 14]


                     Designated Mailers Protocol           April 2003


   Maintainers of mailing lists that do not alter the sender envelope
   SHOULD NOT to participate in the Protocol until they upgrade their
   mailing list software.

8.4 Mail Forwarding such as .forward files on *ix systems

   This author recognizes that every MTA using .forward files on *ix
   hosts or similar configurations do not alter the sender envelope
   when forwarding mail.  However, commercial and proprietary mail-
   forwarding systems such as mail.com[tm] alter the sender envelope,
   and these are by far the most popular pure mail-forwarding
   instances.

   There is no fix for .forward usage aside from altering the sender
   envelope and designating the forwarding host as a Designated Mailer
   for itself, as described in 5.2 above.

8.5 SMTP Source Routing

   While depreciated, few SMTP sites still support source routing.
   Consider the following sender envelope:

   MAIL FROM:<@host.one,@host.two:user@host.three>

   If a participating site supports source routing, the site SHOULD
   perform its Protocol lookup on "host.one" as the client should be
   from that domain.  Otherwise, the site MUST perform its Protocol
   lookup on "host.three".


9. Accepting Mail from the Null Sender Envelope: MAIL FROM:<>

   As there is no domain to perform a DMP Protocol lookup in a Null
   Sender envelope, it is difficult to tell if the sender of such a
   message is authorized to do so.  However, there are other ways to
   ensure the sender is authorized to send it.

   According to RFC 2821 section 4.5.5, the Null reverse-path
   accompanies Delivery Status Notifications, Message Disposition
   Notifications, and other messages which are notifications about
   previous, non-null-enveloped messages.  These types of messages are
   always generated by mail delivery software only, and not by users.

   We can ensure that null reverse-path messages only come from hosts
   running MTAs and not from users.  The simplest is to make the sender
   host a Designated Mailer for itself as described in 5.2 above. To
   strengthen this, a recipient server MAY inspect the forward or



Fecyk                  Expires - September 2003              [Page 15]


                     Designated Mailers Protocol           April 2003

   reverse DNS records, or both, on the client host's HELO or EHLO
   identifier:

   S: 220 mail.example.net MMS SMTPRCV service v0.95
   C: HELO clientmachine.example.com
   S: 250 mail.example.net Hello clientmachine.example.com
   [192.168.0.1]
   C: MAIL FROM:<>
   (server looks up 1.0.168.192.in-addr._smtp-
   client.clientmachine.example.com and receives "dmp=allow")
   (optional: server looks up clientmachine.example.com and receives
   192.168.0.1, compares A RR record to connecting IP address and they
   match)
   (optional: server looks up 1.0.168.192.in-addr.arpa for PTR and
   receives clientmachine.example.com, compares PTR RR record to HELO'd
   name and they match)
   S: 250 OK Null reverse-path message coming from
   clientmachine.example.com

   With the exception of using the HELO or EHLO host name as the domain
   to perform the DMP lookup on, and the optional comparisons suggested
   above, the flowchart for handling null reverse-path messages is
   identical to that for handing other messages.

   Note that a HELO or EHLO host name is not necessarily a mail domain.
   DMP only treats it as one for the purpose of performing a Protocol
   lookup, and only for messages with null reverse-paths.


10. Security Considerations

10.1 DNS Security

   Designated Mailers Protocol relies solely on DNS to verify
   Designated Mailer hosts. Any compromise of a domain's DNS records
   would make that domain vulnerable to "spoofing" in a run by
   spammers, but the spammers would need to insert necessary name
   records into your DNS zone.  Likewise, a compromised server at the
   tier below a domain could allow spammers to insert false Designated
   Mailer records for that domain. Best current practices for DNS
   server security will prevent these and similar abuses.  DMP records
   may reside on DNSSEC servers without changes to the Protocol.

10.2 Mail Transfer Agent Security

   Compromised hosts already identified as Designated Mailers may be
   used to send unauthorized e-mail in the name of the designator's
   domain. Best current practices for SMTP MTAs in general will prevent
   these and similar abuses.


Fecyk                  Expires - September 2003              [Page 16]


                     Designated Mailers Protocol           April 2003


10.3 DNS Outages

   A domain may still be successfully spoofed if the sender domain's
   records are unreachable (SERVFAIL), AND if the participating server
   accepts SMTP traffic from, possibly, non-participating domains.
   Participating sites SHOULD refuse SMTP traffic based on this case,
   using a 400 series error indicating a temporary failure, even if
   they choose to accept SMTP traffic from domains that decidedly not
   (NXDOMAIN) participate, to avoid this.

10.4 Answering RFC 2821 7.1: Mail Security and Spoofing

   From 7.1 of RFC 2821:

     Efforts to make it more difficult for users to set envelope return
     path and header "From" fields to point to valid addresses other
     than their own are largely misguided: they frustrate legitimate
     applications in which mail is sent by one user on behalf of
     another or in which error (or normal) replies should be directed
     to a special address.

     [...]

     This specification does not further address the authentication
     issues associated with SMTP other than to advocate that useful
     functionality not be disabled in the hope of providing some small
     margin of protection against an ignorant user who is trying to
     fake mail.

   Designated Mailers Protocol still allows a user to send mail on
   behalf of another within the same domain.  It also still allows
   mailing list systems to send mail to subscribers on behalf of other
   subscribers in different domains.

   DMP does not affect the From or Reply-to headers, or body of a
   message.  It still allows sending mail on behalf of another, while
   using an envelope authorized for use within the sender's domain.

   We are no longer looking at one or two ignorant users trying to fake
   mail.  Today we are looking at an entire industry built on the
   unwilling backs of recipients, based on several hundreds of
   thousands of deliberately ignorant users who fake mail for fun and
   profit.  This author can live with losing a little otherwise-useful
   functionality for a very large margin of protection against them.


11. References



Fecyk                  Expires - September 2003              [Page 17]


                     Designated Mailers Protocol           April 2003


   1. Bradner, S., "Key words for use in RFCs to Indicate Requirement
      Levels", BCP 14, RFC 2119, March 1997

   2. Credit where due: B. Gingery first brought up the topic on the
      SPAM-L mailing list, and it had been discussed earlier on the
      Spamtools mailing list.  There are other documents describing
      similar approaches to this problem.

   3. Derek J. Balling <dredd@megacity.org> for initial design of the
      DNS record template and explanation, and "der Mouse"
      <mouse@rodents.montreal.qc.ca> for generalizing it into the
      current form.

   4. Gulbrandsen, A., Vixie, P., "A DNS RR for specifying the location
      of services (DNS SRV)", RFC 2052, October 1996

   5. 4.3.2 of Klensin, J., "Simple Mail Transfer Protocol", RFC 2821,
      April 2001

   6. 2.1 of Lindenberg, G., "Anti-Spam Recommendations for SMTP MTAs",
      RFC 2505, February 1999

   7. 4.5.5 of Klensin, J., "Simple Mail Transfer Protocol", RFC 2821,
      April 2001

   8. Rosenbam, R., "Using the Domain Name System To Store Arbitrary
      String Attributes", RFC 1464, May 1993


12. Acknowledgments

   Derek J. Balling <dredd@megacity.org> for initial design of the DNS
      record template and explanation, and "der Mouse"
      <mouse@rodents.montreal.qc.ca> for generalizing it into the
      current form.

   Michael A. Smith for the hint to RFC 1464.

   Jack Bates for SMTP Source Routing hints.

   Steve Atkins and Bill Cole for DNS Clue.

   "der Mouse" for IPv6 hints and implementation testing.


13. Author's Addresses




Fecyk                  Expires - September 2003              [Page 18]


                     Designated Mailers Protocol           April 2003

   Gordon Fecyk
   Pan-Am Internet Services
   24 - 482 Young Street
   Winnipeg, MB  R3B 2S6
   Canada
   Phone: (204) 292-9970
   Email: gordonf@pan-am.ca


14. Full Copyright Statement

   Copyright (C) The Internet Society (2003). All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph
   are included on all such copies and derivative works. However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."















Fecyk                  Expires - September 2003              [Page 19]