From 82149b6a3378242d3f797c6e74c1ad7d980f9216 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sun, 23 Oct 2005 06:46:53 +0000 Subject: Use msg.send() to add Date header in create notification. Mlist is already removed when remove. Use email.Utils.formatdate(). --- Mailman/MTA/Manual.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Mailman/MTA') diff --git a/Mailman/MTA/Manual.py b/Mailman/MTA/Manual.py index fae3889c..7e4e4648 100644 --- a/Mailman/MTA/Manual.py +++ b/Mailman/MTA/Manual.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2003 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2005 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 @@ -17,6 +17,7 @@ """Creation/deletion hooks for manual /etc/aliases files.""" import sys +import email.Utils from cStringIO import StringIO from Mailman import mm_cfg @@ -96,8 +97,7 @@ equivalent) file by adding the following lines, and possibly running the siteowner, siteowner, _('Mailing list creation request for list %(listname)s'), sfp.getvalue(), mm_cfg.DEFAULT_SERVER_LANGUAGE) - outq = get_switchboard(mm_cfg.OUTQUEUE_DIR) - outq.enqueue(msg, recips=[siteowner], nodecorate=1) + msg.send(mlist) @@ -140,5 +140,6 @@ equivalent) file by removing the following lines, and possibly running the siteowner, siteowner, _('Mailing list removal request for list %(listname)s'), sfp.getvalue(), mm_cfg.DEFAULT_SERVER_LANGUAGE) + msg['Date'] = email.Utils.formatdate(localtime=1) outq = get_switchboard(mm_cfg.OUTQUEUE_DIR) outq.enqueue(msg, recips=[siteowner], nodecorate=1) -- cgit v1.2.3