-R

What DSN info to return on a bounce V8.8 and later

The -R command-line switch tells sendmail to include the DSN RET command with an ESMTP MAIL command:

MAIL From:<you@your.host> RET=full
MAIL From:<you@your.host> RET=hdrs

The RET command requests the receiving site to (or not to) include a copy of the original message body in the bounced mail notification. RET=full requests that both headers and the message body be returned. RET=hdrs requests that only headers be returned. The RET= command affects the receiving site only if it agrees to handle the DSN extension to ESMTP. In the absence of RET or remote DSN support, the receiving site is free to return the message body if it so desires.

For local mail, sendmail uses this -R command-line switch to determine how it will handle local bounces. Normally, sendmail includes everything (full) in a locally generated bounce. By using hdrs, you can restrict local bounces to only the header portions of the original message.

The RET, and hence this -R command-line switch, is useful in two circumstances:

  • For users sending email, this should be set to full so that any bounced mail will include the original message body. This helps to reduce the need for users to archive their outgoing mail.

  • For mailing-list mailings or other batched broadcast messages, this should be set to hdrs so that only the header portion of the bounced message will be returned.

The form of the -R command-line switch looks like this:

-R arg

Space between the -R and its argument is ...

Get sendmail, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.