[Mailman-Users] Unsubscribe Using Web Form

Greg Sims greg at headingup.net
Sat Nov 8 00:28:32 CET 2014


Hey Mark,

Subscribe / Unsubscribe works well for the normal case thanks to your help.

(1) When I Unsubscribe an email address that does not exist, the result of
Posting the form is:

--------
Bug in Mailman version 2.1.12

We're sorry, we hit a bug!

Please inform the webmaster for this site of this problem. Printing of
traceback and other system information has been explicitly inhibited, but
the webmaster can find this information in the Mailman error logs.

---------

The error log is:

Nov 07 16:41:51 2014 admin(385):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

admin(385): [----- Mailman Version: 2.1.12 -----]

admin(385): [----- Traceback ------]

admin(385): Traceback (most recent call last):

admin(385):   File "/usr/lib/mailman/scripts/driver", line 112, in run_main

admin(385):     main()

admin(385):   File "/usr/lib/mailman/Mailman/Cgi/options.py", line 495, in
main

admin(385):     user, 'via the member options page', userack=1)

admin(385):   File "/usr/lib/mailman/Mailman/MailList.py", line 1007, in
DeleteMember

admin(385):     self.ApprovedDeleteMember(name, whence, admin_notif,
userack)

admin(385):   File "/usr/lib/mailman/Mailman/MailList.py", line 1023, in
ApprovedDeleteMember

admin(385):     self.removeMember(emailaddr)

admin(385):   File "/usr/lib/mailman/Mailman/OldStyleMemberships.py", line
221, in removeMember

admin(385):     self.__assertIsMember(member)

admin(385):   File "/usr/lib/mailman/Mailman/OldStyleMemberships.py", line
114, in __assertIsMember

admin(385):     raise Errors.NotAMemberError, member

admin(385): NotAMemberError: x at y.com
The backtrace ends in a "NotAMemberError" which is exactly what happened.
The "result" from the POST seems to be a bit off.  I need to determine the
difference between success and failure looking the the result of the POST.
 "we hit a bug!" is kind of a funny thing to match against.

(2) It appears that the Subscription sequence always returns the contents
of the file "subscribe.html".  Is this in fact always the case?  I tried to
subscribe to email address "foo" and did not receive an error -- even
though this is not a valid email address.  I suppose I could validate the
email address format with my PHP code and provide user feedback.

(3) It appears the Unsubscribe sequence I created allows for anyone to
unsubscribe anyone else -- all they need to know is an email address that
is subscribed to the list.  This is as a result of using the list admin
password in my PHP code.  I wish there was a way to pass the email address
and password of the subscriber from a non-digest email to my PHP code via
POST.  I tried turning personalization on.  It does not seem to be possible
to place a <form> in the footer (or header?) of the email.  It also appears
that mailman does not replace symbols in the body of an email.  This led me
to believe the only way to accomplish passing the email address and
password via POST is by writing a custom mailman filter that replaces the
symbols -- likely in the body of an email.

It there a simple way to get the subscribers password (and email address
but less important) via POST from a non-digest email to my PHP code?  This
ensures that someone using my Web Form can only unsubscribe the email
address of a mailman email they received (or have access to).

(4) When I get this all sorted out, would you like me to write it up for a
FAQ or something?  I would be happy to do this if you believe it is
worthwhile.

Thanks Mark!  Greg


More information about the Mailman-Users mailing list