BY:IT/Changelog Mailserver/Sync Mailman Patches

für den Sync zwischen unseren Mailinglisten und dem Newsserver/Forum wurden einige Änderungen im Mailman vorgenommen.

Es handelt sich um folgende Patches:

gate_news
--- mailman-2.1.9.orig/cron/gate_news   2009-04-17 02:41:00.000000000 +0200
+++ mailman-2.1.9/cron/gate_news        2009-04-17 02:41:11.000000000 +0200
@@ -171,6 +171,7 @@
                     msg['X-Originally-To'] = msg['To']
                     del msg['To']
                 msg['To'] = mlist.GetListEmail()
+                del msg['Newsgroups']
                 # Post the message to the locked list
                 inq = get_switchboard(mm_cfg.INQUEUE_DIR)
                 inq.enqueue(msg,

gate_news

--- cron/gate_news      2005-08-27 01:40:17 +0000
+++ cron/gate_news      2008-09-21 19:12:52 +0000
@@ -1,6 +1,6 @@
 #! @PYTHON@
 #
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -206,8 +206,11 @@
         # Open the newsgroup, but let most exceptions percolate up.
         try:
             conn, first, last = open_newsgroup(mlist)
-        except (socket.error, nntplib.NNTPError):
-            break
+        except (socket.error, nntplib.NNTPError), e:
+            syslog('fromusenet',
+                   "%s: couldn't open newsgroup %s: skipping\n%s",
+                   listname, mlist.linked_newsgroup, e)
+            continue
         syslog('fromusenet', '%s: [%d..%d]' % (listname, first, last))
         try:
             try:

NewsRunner.py

--- mailman-2.1.9.orig/Mailman/Queue/NewsRunner.py      2009-04-17 02:39:54.000000000 +0200
+++ mailman-2.1.9/Mailman/Queue/NewsRunner.py   2009-04-17 02:41:11.000000000 +0200
@@ -59,6 +59,8 @@
     def _dispose(self, mlist, msg, msgdata):
         # Make sure we have the most up-to-date state
         mlist.Load()
+        if msg['X-Mailman-ID']:
+            return False
         if not msgdata.get('prepped'):
             prepare_message(mlist, msg, msgdata)
         try:
@@ -143,8 +145,7 @@
             if lname == mlist.internal_name() and hname == mlist.host_name:
                 hackmsgid = False
     if hackmsgid:
-        del msg['message-id']
-        msg['Message-ID'] = Utils.unique_message_id(mlist)
+        msg['X-Mailman-ID'] = Utils.unique_message_id(mlist)
     # Lines: is useful
     if msg['Lines'] is None:
         # BAW: is there a better way?