next up previous contents
Next: Using Perl to Send Up: Sending Mail (SMTP) Previous: The DATA Command

Reporting Undeliverable Mail

The mail server is responsible for reporting undeliverable mail, so you may not need to know too much about this topic. However, this information may come in handy if you ever write/run a list service or if you send a message from a temporary account.

An endless loop happens when an error notification message is sent to a non-existent mailbox. The server keeps trying to send a notification message to the reverse-path specified in the MAIL command.

The answer to this dilemma is to specify an empty reverse path in the MAIL command of a notification message like this:

MAIL FROM:<>

An entire mail session that delivers an error notification message might look like the following:

MAIL FROM:<>
250 ok
RCPT TO:<@HOST.COM@HOSTW.ARPA>
250 ok
DATA
354 send the mail data, end with .
Date: 12 May 99 10:55:51
From: dave@cs.cf.ac.uk
To: user@net.com
Subject: Problem delivering mail.


 your message to fmiles@net.com was not
delivemiles.


    net.com said this:
        "550 No Such User"
.
250 ok



dave@cs.cf.ac.uk