dovecot-2.1: lib-lda: Send DSN instead of MDN for rejections.

dovecot at dovecot.org dovecot at dovecot.org
Sun Feb 12 07:00:24 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/264821ba38a8
changeset: 14128:264821ba38a8
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Feb 12 07:00:12 2012 +0200
description:
lib-lda: Send DSN instead of MDN for rejections.
I had just copy&pasted the MDN sending from Cyrus..

diffstat:

 src/lib-lda/mail-send.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r 731d9f2cd25d -r 264821ba38a8 src/lib-lda/mail-send.c
--- a/src/lib-lda/mail-send.c	Sun Feb 12 06:59:32 2012 +0200
+++ b/src/lib-lda/mail-send.c	Sun Feb 12 07:00:12 2012 +0200
@@ -99,7 +99,7 @@
     fprintf(f, "To: <%s>\r\n", return_addr);
     fprintf(f, "MIME-Version: 1.0\r\n");
     fprintf(f, "Content-Type: "
-	    "multipart/report; report-type=disposition-notification;\r\n"
+	    "multipart/report; report-type=delivery-status;\r\n"
 	    "\tboundary=\"%s\"\r\n", boundary);
 
     str = t_str_new(256);
@@ -122,20 +122,18 @@
 	       get_var_expand_table(mail, reason, recipient));
     fprintf(f, "%s\r\n", str_c(str));
 
-    /* MDN status report */
+    /* DSN status report */
     fprintf(f, "--%s\r\n"
-	    "Content-Type: message/disposition-notification\r\n\r\n",
+	    "Content-Type: message/delivery-status\r\n\r\n",
 	    boundary);
-    fprintf(f, "Reporting-UA: %s; Dovecot Mail Delivery Agent\r\n",
+    fprintf(f, "Reporting-MTA: dns; %s\r\n",
 	    ctx->set->hostname);
     if (mail_get_first_header(mail, "Original-Recipient", &hdr) > 0)
 	    fprintf(f, "Original-Recipient: rfc822; %s\r\n", hdr);
     fprintf(f, "Final-Recipient: rfc822; %s\r\n", recipient);
 
-    if (orig_msgid != NULL)
-	fprintf(f, "Original-Message-ID: %s\r\n", orig_msgid);
-    fprintf(f, "Disposition: "
-	    "automatic-action/MDN-sent-automatically; deleted\r\n");
+    fprintf(f, "Action: failed\r\n");
+    fprintf(f, "Status: 5.2.0\r\n");
     fprintf(f, "\r\n");
 
     /* original message's headers */


More information about the dovecot-cvs mailing list