From 0f52f638630da66fc58c7e3f6ff639abd9388666 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 17 Jan 2020 01:49:30 +0300 Subject: [PATCH] Add "Auto-Submitted: auto-replied" header to MDNs This header is specified in RFC 3834. --- src/mimefactory.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 258f07710..aeafb8062 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -401,6 +401,13 @@ impl<'a, 'b> MimeFactory<'a, 'b> { )); unprotected_headers.push(Header::new("Chat-Version".to_string(), "1.0".to_string())); + if let Loaded::MDN = self.loaded { + unprotected_headers.push(Header::new( + "Auto-Submitted".to_string(), + "auto-replied".to_string(), + )); + } + if self.req_mdn { // we use "Chat-Disposition-Notification-To" // because replies to "Disposition-Notification-To" are weird in many cases