This is the mail archive of the
cygwin-apps-cvs
mailing list for the cygwin-apps project.
[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-57-gdebaf7a
- From: jturney at sourceware dot org
- To: cygwin-apps-cvs at sourceware dot org
- Date: 8 Apr 2017 13:42:13 -0000
- Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-57-gdebaf7a
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=debaf7a24f5c21ba130c6ffd8cbcd5486f57bd0a
commit debaf7a24f5c21ba130c6ffd8cbcd5486f57bd0a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sat Apr 8 14:12:31 2017 +0100
Ensure calm's email have Message-Id: and Date: headers
Diff:
---
calm/buffering_smtp_handler.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/calm/buffering_smtp_handler.py b/calm/buffering_smtp_handler.py
index 13fca18..0025a5b 100644
--- a/calm/buffering_smtp_handler.py
+++ b/calm/buffering_smtp_handler.py
@@ -24,6 +24,7 @@
import logging
import logging.handlers
import email.message
+import email.utils
from . import common_constants
@@ -56,6 +57,8 @@ class BufferingSMTPHandler(logging.handlers.BufferingHandler):
m['To'] = ','.join(self.toaddrs)
m['Bcc'] = common_constants.ALWAYS_BCC
m['Subject'] = self.subject
+ m['Message-Id'] = email.utils.make_msgid()
+ m['Date'] = email.utils.formatdate()
m['X-Calm'] = '1'
# use utf-8 only if the message can't be ascii encoded