[Mailman-Users] add_members and email confirmation

Ren Bucholz ren at trubble.com
Sat Dec 10 22:16:16 CET 2005


One last caveat: following the confirmation link works, as does  
confirming your subscription once you get there.  However, *cancelling*  
your subscription from the website leads to the same "We hit a bug  
message."  I'm not including the URL in my verify.txt confirmation  
message (users just have to reply), but I thought y'all might want to  
know about this outstanding issue.  Users can always ignore the  
confirmation, of course, but errors are unsettling.

Thanks again, and I'm happy to test any suggested fixes that emerge.

-Ren


On Dec 10, 2005, at 3:45 PM, Ren Bucholz wrote:

> Mark is officially awesome.  This works, and now my list can be
> confirmed-opt-in.  Thanks sooooo much!
>
> -Ren
>
> PS - If you want to see the final, working replacement for Add_Members,
> you can get it here:
>    http://trubble.com/miscellaneous/new_add_members.txt
>
> On Dec 10, 2005, at 2:43 PM, Mark Sapiro wrote:
>
>> Ren Bucholz wrote:
>>>
>>> I'm still having a problem with the confirmations, however.  To  
>>> recap,
>>> I'm trying to use a modified version of add_members (call it
>>> new_add_members) in order to subscribe people via my own webform
>>> (where
>>> PHP executes add_members).  I modified it because I'd like the list  
>>> to
>>> be confirmed opt-in, but add_members assumes that the user has
>>> confirmed their subscription and doesn't bother with the confirmation
>>> message. There's a longer description of what I did in this list's
>>> archives, if you're interested:
>>>   http://www.mail-archive.com/mailman-users@python.org/msg35077.html
>>>
>>> The problem is that this script totally breaks Mailman's web
>>> subscription features.  The first time I run new_add_members, I get a
>>> seemingly normal looking confirmation.  Upon clicking the  
>>> confirmation
>>> link, I get the Mailman's generic "Sorry, We Hit A Bug!" message.   
>>> And
>>> from that point forward, attempting to subscribe via the list's
>>> standard Mailman info page (foo.com/mailman/listinfo/your_list)
>>> generates the same error.  You can still subscribe by calling the
>>> unmodified add_members.  The error logs say:
>>>
>>> admin(32487): [----- Mailman Version: 2.1.5 -----]
>>> admin(32487): [----- Traceback ------]
>>> admin(32487): Traceback (most recent call last):
>>> admin(32487):   File "/usr/lib/mailman/scripts/driver", line 101, in
>>> run_main
>>> admin(32487):     main()
>>> admin(32487):   File "/usr/lib/mailman/Mailman/Cgi/subscribe.py",  
>>> line
>>> 96, in main
>>> admin(32487):     process_form(mlist, doc, cgidata, language)
>>> admin(32487):   File "/usr/lib/mailman/Mailman/Cgi/subscribe.py",  
>>> line
>>> 176, in process_form
>>> admin(32487):     mlist.AddMember(userdesc, remote)
>>> admin(32487):   File "/usr/lib/mailman/Mailman/MailList.py", line  
>>> 854,
>>> in AddMember
>>> admin(32487):     cookie = self.pend_new(Pending.SUBSCRIPTION,
>>> userdesc)
>>> admin(32487):   File "/usr/lib/mailman/Mailman/Pending.py", line 65,
>>> in
>>> pend_new
>>> admin(32487):     db = self.__load()
>>> admin(32487):   File "/usr/lib/mailman/Mailman/Pending.py", line 95,
>>> in
>>> __load
>>> admin(32487):     return cPickle.load(fp)
>>> admin(32487): AttributeError: 'module' object has no attribute
>>> 'UserDesc'
>> <snip>
>>
>>> If anyone has any idea how to fix this, I'd be most appreciative.  I
>>> should also mention that error isn't limited to a single address -
>>> subscribing me at fake.com via new_add_members will cause a web
>>> subscription for you at fake.com to fail. Thanks for reading this far!
>>
>>
>> At this point, lists/listname/pending.pck is corrupt and has to be
>> removed for normal stuff to proceed.
>>
>> The underlying problem is new_members defines the UserDesc class to be
>> empty, thus when you call
>>
>> mlist.AddMember(userdesc, remote="Webpage")
>>
>> userdesc is not a valid UserDesc instance for AddMember which is where
>> things go wrong.
>>
>> I think you need to do the following in your script.
>>
>> Add
>>
>> from Mailman.UserDesc import UserDesc
>>
>> Remove
>>
>> class UserDesc: pass
>>
>> It looks like that's all you need, but I haven't looked too  
>> thoroughly.
>>
>> --  
>> Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
>> San Francisco Bay Area, California    better use your sense - B. Dylan
>>
>
> ------------------------------------------------------
> Mailman-Users mailing list
> Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
> Searchable Archives:  
> http://www.mail-archive.com/mailman-users%40python.org/
> Unsubscribe:  
> http://mail.python.org/mailman/options/mailman-users/ren%40trubble.com
>
> Security Policy:  
> http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp; 
> file=faq01.027.htp




More information about the Mailman-Users mailing list