mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-27 16:17:03 +00:00
queue: Internationalized Delivery Status Notifications (DSN)
Our non-delivery status notifications are quite simple today, but that makes it much more difficult to support internationalization and cross-language reporting. There is a standard for internationalized DSNs, RFC 6533 (which builds on top of the structured DSNs from RFC 3464). This patch changes our DSN messages to be based on those standards, so it is easier for MUAs to display reports according to the users' languages preferences. Note we still use message/rfc822 + 8bit to transmit the message, instead of message/global, for compatibility reasons. This seems to be more universally compatible, but the decision might be revisited in the future. See RFC 5335 (section 4.6 in particular).
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
From: Mailer daemon <somewhere@horns.com>
|
||||
From: Mailer daemon <somewhere@báratro>
|
||||
Subject: I've come to haunt you
|
||||
Message-ID: <booooo>
|
||||
|
||||
Muahahahaha
|
||||
Ñañañañaña!
|
||||
|
||||
|
||||
@@ -4,21 +4,49 @@ To: <user@testserver>
|
||||
Subject: Mail delivery failed: returning message to sender
|
||||
Message-ID: *
|
||||
Date: *
|
||||
In-Reply-To: <booooo>
|
||||
References: <booooo>
|
||||
X-Failed-Recipients: fail@testserver,
|
||||
Auto-Submitted: auto-replied
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/report; report-type=delivery-status;
|
||||
boundary="???????????"
|
||||
|
||||
Delivery to the following recipient(s) failed permanently:
|
||||
|
||||
--???????????
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Disposition: inline
|
||||
Content-Description: Notification
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Delivery of your message to the following recipient(s) failed permanently:
|
||||
|
||||
- fail@testserver
|
||||
|
||||
|
||||
----- Technical details -----
|
||||
|
||||
Technical details:
|
||||
- "false" (PIPE) failed permanently with error:
|
||||
exit status 1
|
||||
|
||||
|
||||
----- Original message -----
|
||||
--???????????
|
||||
Content-Type: message/global-delivery-status
|
||||
Content-Description: Delivery Report
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reporting-MTA: dns; testserver
|
||||
|
||||
Original-Recipient: utf-8; fail@testserver
|
||||
Final-Recipient: utf-8; false
|
||||
Action: failed
|
||||
Status: 5.0.0
|
||||
Diagnostic-Code: smtp; exit status 1
|
||||
|
||||
|
||||
|
||||
--???????????
|
||||
Content-Type: message/rfc822
|
||||
Content-Description: Undelivered Message
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Received: from localhost
|
||||
by testserver (chasquid) with ESMTPSA
|
||||
@@ -26,9 +54,12 @@ Received: from localhost
|
||||
(over *
|
||||
; *
|
||||
Date: *
|
||||
From: Mailer daemon <somewhere@horns.com>
|
||||
From: Mailer daemon <somewhere@báratro>
|
||||
Subject: I've come to haunt you
|
||||
Message-Id: <booooo>
|
||||
|
||||
Muahahahaha
|
||||
Ñañañañaña!
|
||||
|
||||
|
||||
|
||||
--???????????--
|
||||
|
||||
@@ -10,10 +10,11 @@ c -> RCPT TO: user@testserver
|
||||
c <~ 250
|
||||
c -> DATA
|
||||
c <~ 354
|
||||
c -> From: Mailer daemon <somewhere@horns.com>
|
||||
c -> From: Mailer daemon <somewhere@báratro>
|
||||
c -> Subject: I've come to haunt you
|
||||
c -> Message-ID: <booooo>
|
||||
c ->
|
||||
c -> Muahahahaha
|
||||
c -> Ñañañañaña!
|
||||
c ->
|
||||
c ->
|
||||
c -> .
|
||||
|
||||
Reference in New Issue
Block a user