Bug 633129

Summary: mailman send_digests "Message instance has no attribute 'get_type' error
Product: [openSUSE] openSUSE 11.3 Reporter: Markus Gaugusch <markus>
Component: NetworkAssignee: Jan Matejek <jmatejek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: bugs, bugzilla, dmueller, erik, ge, sledz, suse-beta
Version: Final   
Target Milestone: ---   
Hardware: 32bit   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Markus Gaugusch 2010-08-20 10:14:31 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.1 Firefox/3.6.6

The cron-job /etc/cron.d/mailman executes send_digests every day at 12:00. I get the following message since I upgraded via zypper dup from 11.2 to 11.3:

List: test-list: problem processing
/var/lib/mailman/lists/test-list/digest.mbox:
Message instance has no attribute 'get_type'




Reproducible: Always
Comment 1 Steffen Sledz 2010-09-06 08:37:57 UTC
I've a similar behaviour when trying to rebuild the archives for a mailing list:

# bin/arch xyz /var/lib/mailman/archives/private/xyz.mbox/xyz.mbox 
Schreibe Archivzustand in Datei /var/lib/mailman/archives/private/h2o/pipermail.pck
Traceback (most recent call last):
  File "bin/arch", line 200, in <module>
    main()
  File "bin/arch", line 188, in main
    archiver.processUnixMailbox(fp, start, end)
  File "/usr/lib/mailman/Mailman/Archiver/pipermail.py", line 564, in processUnixMailbox
    m = mbox.next()
  File "/usr/lib/python2.6/mailbox.py", line 1955, in next
    return self.factory(_PartialFile(self.fp, start, stop))
  File "/usr/lib/mailman/Mailman/Mailbox.py", line 89, in scrubber
    return mailbox.scrub(msg)
  File "/usr/lib/mailman/Mailman/Mailbox.py", line 109, in scrub
    return self._scrubber(self._mlist, msg)
  File "/usr/lib/mailman/Mailman/Handlers/Scrubber.py", line 192, in process
    ctype = part.get_type(part.get_default_type())
AttributeError: Message instance has no attribute 'get_type'

# rpm -q mailman python
mailman-2.1.11-13.2.i586
python-2.6.5-2.11.i586
Comment 2 Steffen Sledz 2010-09-10 07:48:14 UTC
Seems to be similar to the problem mentioned here: http://www.mail-archive.com/mailman-users@python.org/msg56608.html

It said that mailman 2.1.11 is not compatible to python 2.6.x :(

So please update to 2.1.12 or newer!
Comment 3 Ge van Geldorp 2010-09-30 09:26:57 UTC
I've been able to get mailman working again by applying this patch:

http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1140

Select "download diff" on that page, save the patch to e.g. /tmp/MailmanPatch, then

cd /usr/lib/mailman
patch -p0 < /tmp/MailmanPatch
Comment 4 Steffen Sledz 2010-09-30 10:47:23 UTC
Thanx. Worked for me. :)
Comment 5 Markus Gaugusch 2010-09-30 10:49:19 UTC
Works for me too, no mail today :-)
Comment 6 Ge van Geldorp 2010-09-30 16:35:17 UTC
What I find slightly worrisome is that the exact same problem was also present in openSuSE 11.1 (bug 448530). I skipped 11.2, so not sure about that one. Seems the process to carry forward bug fixes from one version to the next is severely broken. Plus testing, at least on this package, appears to be non-existent.
Comment 7 Klaus Singvogel 2010-11-25 12:43:59 UTC
I've been hit by this issue either. Digest ain't working.
Any changes of updates?
Comment 8 Juergen Weigert 2010-11-25 14:46:55 UTC
we have mailman 2.1.14 in server:mail, would that fix the issue?
Adding Dirk, who did the update there.
Comment 9 Klaus Singvogel 2010-11-25 14:56:08 UTC
If there will be a package for openSUSE-11.3 too, then "yes! great job!"

mailman is currently disabled for 11.3:
https://build.opensuse.org/project/monitor?arch_i586=1&defaults=0&disabled=1&project=server%3Amail&repo_openSUSE_11_3=1
Comment 10 Klaus Singvogel 2010-11-26 10:23:42 UTC
mailman-2.1.14 is now avail in server:mail repository. I installed and run "unshunt". No more shunt files avail, digest mbox filled up (as expected) and the error logfile didn't grow.

I think it's working fine, but didn't test all the functionality of the package, but main functionality distributing e-mails to various recipients is working too. :-)

I would suggest to do close the bug and to do the swamp/update with the new package from server:mail repository. :-)
Comment 11 Erik Brakkee 2011-01-06 12:16:38 UTC
I ran into this issue as well upgrading from opensuse 11.2 (32 bit) to 11.3 (64 bit). In my case I can confirm that the functionality was working in 11.2 because I used that for a longer time. 

Perhaps also good to mention that the repo URL is http://download.opensuse.org/repositories/server:/mail/openSUSE_11.3/ 

I fixed the problem by downloading only the mailman rpm from the repo and installing it (do not want to deviate too much from the mainline by getting upgrades for other mail related functionality).
Comment 12 Klaus Singvogel 2011-01-06 13:18:19 UTC
Erik,
the issue is in "zypper dup". It doesn't "refresh" the repositories and as a matter of fact you didn't get the bugfixed mailman installed.

The fixed packages are already avail. I cost me several hours to find this out.

Either you enable the Refresh option in the repositories (use zypper, yast or similar for this), or you a "zypper ref" before any of your "zypper up" calls. I would suggest the first, as it it less error prone. :-)
Comment 13 Erik Brakkee 2011-01-06 13:34:40 UTC
That doesn't work for me. All repositories that are enabled are also automatically refreshed. Also running 'zypper ref' followed by 'zypper dup' reinstalled the old mailman version again. 

NOTE: I do not have the server:mail repository in my repository list.
Comment 14 Erik Brakkee 2011-01-06 13:37:07 UTC
Also, I am running 64 bit, not 32 bit as indicated in the bug.
Comment 15 Christian Boltz 2011-01-10 23:43:51 UTC
This problem was just brought up on the german postfixbuch-users mailinglist, however in a more critical version: at least one of his users can't post to the mailinglist.

Error log copied from the mail:
Jan 10 12:17:03 2011 (2497) SHUNTING:
1294658221.996407+045e901544f18611fa2eb3ad7627f69c4486f7f7
Jan 10 12:19:06 2011 (2497) Uncaught runner exception: Message instance
has no attribute 'get_type'
Jan 10 12:19:06 2011 (2497) Traceback (most recent call last):
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 120, in _oneloop
self._onefile(msg, msgdata)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 191, in
_onefile
keepqueued = self._dispose(mlist, msg, msgdata)
ile "/usr/lib/mailman/Mailman/Queue/OutgoingRunner.py",
ine 74, in _dispose
self._func(mlist, msg, msgdata)
File
"/usr/lib/mailman/Mailman/Handlers/SMTPDirect.py",
line 159, in process
deliveryfunc(mlist, msg, msgdata, envsender,
refused, conn)
File
"/usr/lib/mailman/Mailman/Handlers/SMTPDirect.py",
line 292, in verpdeliver
Decorate.process(mlist, msgcopy, msgdata)
File
"/usr/lib/mailman/Mailman/Handlers/Decorate.py",
line 133, in process
elif msg.get_type() ==
'multipart/mixed':
AttributeError: Message instance has
no attribute 'get_type'


-> Please release the fix (see comment #3) or a newer mailman version as
   maintenance update!

-> Please also update mailman in Factory, it's still at version 2.1.11 and most 
   probably shares the same bug
Comment 16 Jan Matejek 2011-04-20 16:06:58 UTC
this was fixed by updating Factory and 11.3 to mailman 2.1.14
(hopefully the same update will happen in 11.2 and SLE11)