[Mailman-Users] Possible Bug in 2.1.13 sync_members

Barry Finkel b19141 at anl.gov
Wed Feb 3 16:49:17 CET 2010


I wrote:

>>I think I may have uncovered a bug in Mailman 2.1.13.  I have not
>>completed my research.  I have a script that refreshes the subscriber
>>list via:
>>
>>/usr/lib/mailman/bin/sync_members -w=no -g=no -d=no -a=no \
>>     -f /e tc/mailman/generated_lists/LISTNAME LISTNAME
>>
>>where
>>
>>     /etc/mailman/generated_lists/LISTNAME
>>
>>is a file that contains a possibly updated mailing list.  In that file
>>there is a line:
>>
>>     ssmith at example.com        (XYZ, 012345, Smith, S.A. (Sam))
>>
>>and after I run the sync_members, every line below this one is
>>ignored; the e-mail addresses in those lines are unsubscribed from
>>the list.  This has happened with two lists since I installed
>>Mailman 2.1.13 (replacing 2.1.11 - I never installed 2.1.12 in
>>production).  The third list that contains this e-mail address has
>>a different format:
>>
>>     ssmith at example.com        (Smith, S.A. (Sam)      :012345)
>>
>>and that list has no problems.  I have not yet checked for changes in
>>the sync_members source from 2.1.11 to 2.1.12 to 2.1.13.


And Mark Sapiro replied:

>There are no changes in sync_members. What has changed is in 2.1.11,
>Mailman used its own email package (version 2.5.8) installed in
>Mailman's pythonlib directory. Beginning with 2.1.12, Mailman uses the
>email package of the installed Python which depends on version.
>
>The difference is almost certainly in email.Utils.getaddresses() which
>is used to parse the lines of the input into 'address' and 'display
>name + comment' parts.
>
>I think the problem is that the addresses
>
>ssmith at example.com        (XYZ, 012345, Smith, S.A. (Sam))
>
>and
>
>ssmith at example.com        (Smith, S.A. (Sam)      :012345)
>
>contain comments within comments and email.Utils.parseaddr() used by
>email.Utils.getaddresses() can be confused by this. However, email
>4.0.1 which is in most recent Python versions parses those into
>
>name: 'XYZ, 012345, Smith, S.A. Sam', address: 'ssmith at example.com'
>
>and
>
>name: 'Smith, S.A. Sam      :012345', address: 'ssmith at example.com'
>
>respectively, so that should be OK. Also email 3.0+ from python 2.4.2
>gives the same result.
>
>In any case, I am surprised at the result. If sync_members finds any
>member addresses in the input file that appear invalid, it reports
>these and quits before doing anything to the list, and if it throws an
>exception while updating the list, it quits without saving the updated
>list.
>
>What's in Mailman's error log? What's in the output from sync_members?


I ran a test with a test list on my test virtual machine, and this is
what is happening.  The line in the "-f" file for sync_members

     bsf-crane at example.com          (New 1 (zzz))

is causing all of the succeeding lines in that file to be treated as
part of the parenthesized "name-comments" field for this new
bsf-crane entry.  The command

     python -v

produces, in part,

     Python 2.4.3 (#2, Jul 31 2008, 21:53:26)

The Python packages installed on this Ubuntu dapper system are

     python
     python-dev
     python-minimal
     python2.4
     python2.4-dev
     python2.4-minimal

and the e-mail piece is found in

     /usr/lib/python2.4/email
and
     __init__.py
has
     __version__ = '3.0.1'

I will have to check if there is a newer Python package for dapper.
----------------------------------------------------------------------
Barry S. Finkel
Computing and Information Systems Division
Argonne National Laboratory          Phone:    +1 (630) 252-7277
9700 South Cass Avenue               Facsimile:+1 (630) 252-4601
Building 240, Room 5.B.8             Internet: BSFinkel at anl.gov
Argonne, IL   60439-4828             IBMMAIL:  I1004994



More information about the Mailman-Users mailing list