[Pkg-mailman-hackers] Bug#838288: mailman: SpamAssassin module broken in Testing and Unstable

Stephen Rothwell debbugs at rothwell.id.au
Mon Sep 19 12:18:50 UTC 2016


Package: mailman
Version: 1:2.1.23-1
Severity: normal
Tags: patch

Dear Maintainer,

   * What led up to the situation?

Upgraded mailman to the version in testing.  We have the SpamAssassin
module in use as per instructions:

in mm_cfg.py we uncommented the line:

GLOBAL_PIPELINE.insert(1, 'SpamAssassin')

Mailman produced errors like these in ite error log:

Sep 16 19:06:29 2016 (3736) Uncaught runner exception: cannot import name matche
s_p
Sep 16 19:06:29 2016 (3736) Traceback (most recent call last):
  File "/var/lib/mailman/Mailman/Queue/Runner.py", line 119, in _oneloop
    self._onefile(msg, msgdata)
  File "/var/lib/mailman/Mailman/Queue/Runner.py", line 190, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/var/lib/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
  File "/var/lib/mailman/Mailman/Queue/IncomingRunner.py", line 150, in _dopipel
ine
    __import__(modname)
  File "/var/lib/mailman/Mailman/Handlers/SpamAssassin.py", line 31, in <module>
    from Mailman.Handlers.Moderate import matches_p
ImportError: cannot import name matches_p

and all messages were shunted.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Applying the following patch fixes the probelm for us:

--- /usr/lib/mailman/Mailman/Handlers/SpamAssassin.py	2016-04-26 03:06:54.000000000 +1000
+++ /backup/usr/lib/mailman/Mailman/Handlers/SpamAssassin.py	2016-05-02 15:21:29.833067102 +1000
@@ -28,7 +28,6 @@
 from Mailman import Errors
 from Mailman.Logging.Syslog import syslog
 from Mailman.Handlers import Hold
-from Mailman.Handlers.Moderate import matches_p
 
 SPAMD_HOST    = getattr(mm_cfg, 'SPAMASSASSIN_HOST', '')
 DISCARD_SCORE = getattr(mm_cfg, 'SPAMASSASSIN_DISCARD_SCORE', 10)
@@ -78,7 +77,7 @@
     if MEMBER_BONUS != 0:
         for sender in msg.get_senders():
             if mlist.isMember(sender) or \
-                   matches_p(sender, mlist.accept_these_nonmembers, mlist.internal_name()):
+                   mlist.GetPattern(sender, mlist.accept_these_nonmembers, at_list='accept_these_nonmembers'):
                 score -= MEMBER_BONUS
                 break
 

   * What was the outcome of this action?

mailman works again

   * What outcome did you expect instead?

--------

It appears that the SpamAssasin module is added by the Debian packaging
and it used an interface from the main mailman package that was removed.

The version of mailman in Stable is fine (1:2.1.18-2+deb8u1) but that
in Testing ans Unstable are broken (1:2.1.22-1 and 1:2.1.23-1).

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'stable'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages mailman depends on:
ii  apache2 [httpd]        2.4.23-4
ii  cron [cron-daemon]     3.0pl1-128
ii  debconf [debconf-2.0]  1.5.59
ii  libc6                  2.23-5
ii  logrotate              3.8.7-2
ii  lsb-base               9.20160629
ii  python-dnspython       1.14.0-3
pn  python:any             <none>
ii  ucf                    3.0036

Versions of packages mailman recommends:
ii  postfix [mail-transport-agent]  3.1.0-5+b1

Versions of packages mailman suggests:
ii  listadmin     2.40-5
ii  lynx          2.8.9dev9-1
ii  spamassassin  3.4.1-5

-- debconf information:
* mailman/create_site_list:
* mailman/used_languages: en
* mailman/default_server_language: en
  mailman/gate_news: false
* mailman/site_languages: en
* mailman/queue_files_present: abort installation

-- debsums errors found:
debsums: changed file /usr/lib/mailman/Mailman/Handlers/SpamAssassin.py (from mailman package)



More information about the Pkg-mailman-hackers mailing list