summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-01-11 05:51:22 +0000
committerbwarsaw2002-01-11 05:51:22 +0000
commita6d284b239005e1ee747f9034214fcd5c47ddfaa (patch)
treecf86a2ddaddb5e78dc5740e26cbd8c7ff8144d28
parentbf6472e86fe49989c7557724a524c46f6190d552 (diff)
downloadmailman-a6d284b239005e1ee747f9034214fcd5c47ddfaa.tar.gz
mailman-a6d284b239005e1ee747f9034214fcd5c47ddfaa.tar.zst
mailman-a6d284b239005e1ee747f9034214fcd5c47ddfaa.zip
send(): RFC 2822 requires the Date: header, and not all MTAs insert
one if it's missing (most notably qmail). It's easy and correct for us to add a compliant one. SF patch #500670 by Jason Mastaler.
-rw-r--r--Mailman/Message.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py
index 64541f2ad..b7e5d2152 100644
--- a/Mailman/Message.py
+++ b/Mailman/Message.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -117,6 +117,9 @@ class UserNotification(Message):
# this is useful for logging to logs/smtp.
if not self.has_key('message-id'):
self['Message-ID'] = Utils.unique_message_id(mlist)
+ # Ditto for Date: which is required by RFC 2822
+ if not self.has_key('date'):
+ self['Date'] = email.Utils.formatdate(localtime=1)
# Not imported at module scope to avoid import loop
from Mailman.Queue.sbcache import get_switchboard
virginq = get_switchboard(mm_cfg.VIRGINQUEUE_DIR)