How to receive Delivery Status Notifications (DSNs) and Read Receipts

Nov 8, 2008 at 4:07 PM
Edited Nov 8, 2008 at 4:13 PM
Velodoc XP Edition is a web application which integrates with an SMTP Server to send email notifications corresponding to messages sent by a user, the issuer of the message, to a recipient. Each message has links to download large files uploaded onto the Velodoc XP Server. There are basically 3 possible configurations:
  1. Using an unattended system mailbox like, as the FROM of the email;
  2. Using the issuer of the message, a user mail address, as the FROM of the email;
  3. Using the issuer of the message as the FROM of the email and the system mailbox as the SENDER of the email, so that the email is sent by the system mailbox on behalf of the user.
First, Delivery Status Notifications (DSNs) are returned to the SENDER of the email, and if there is no SENDER specified, to the FROM address of the email. Trying to set the "Return-Path" header in the email won't change anything because "Return-Path" is always overwritten by the SMTP server.

Second, most recent mail servers perform several checks before accepting incoming emails, otherwise they reject them as spam:
  1. First they query the DNS to check the PTR record associated with the IP address which has sent the email. Some servers will just require that the designated domain exist , others might require that the designated domain matches the domain name in the FROM field and/or in the SENDER field;
  2. Then they might also query SPF records and DKIM records if they exist for the domain name of the FROM and SENDER addresses.
So you are left with a choice which is:
  • either having your users receive DSNs and having most of the emails sent by Velodoc XP Edition being caught by spam filters because your SMTP server is not authorised to send on behalf of users;
  • or escaping spam filters but not receiving DSNs.
The second is obviouly the preferred option and all email notifications sent by Velodoc XP Edition should be sent by an unattended system mail address like where DNS records (essentially PTR and SPF) exist to show that is authorised to send from the IP address of the SMTP server used to send mails with the tradeoff that all delivery status notifications will return to

To improve this situation, we have implemented two features:
  1. You can now configure in web.config an application setting named "GetReadReceipt" which is set to true by default and which invites recipients to return a read receipt of email notifications.
  2. All email notifications are sent with a "X-Forward-DSN-To" header containing the email address of the issuer of the message, and depending on your mail server you can either configure a rule which forwards each DSN to the issuer of the message, or install the SMTP transport event sink which is part of the project and which does that for you on Microsoft SMTP servers.