Update of /cvsroot/mailman/mailman3/src/mailman/handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31133/src/mailman/handlers
Added Files:
Tag: 3.0
__init__.py messageid.py
Log Message:
Initial checkin of Mailman3 source
--- NEW FILE: __init__.py ---
--- NEW FILE: messageid.py ---
# Copyright (C) 2004 Barry A. Warsaw
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA.
"""Ensure that the message has a message id, before anything else happens."""
import logging
from email.Utils import make_msgid
log = logging.getLogger('mailman.smtp')
def process(mlist, msg, msgdata):
msgid = msg['message-id']
if msgid is None:
msgid = make_msgid(mlist.listId())
msg['Message-ID'] = msgid
msgdata['message-id'] = msgid
log.info('Processing message: %s', msgid)
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org