[Mailman-Users] Unable to remove email with control chars from a list
Hugo Kobayashi
hkkobayashi at gmail.com
Fri Oct 22 20:36:48 CEST 2004
Hello,
I received a complaint from a user saying he was unable to post to a
list (in mailman 2.1.5). He was receiving messages from the list with
no problem, but when he tried to post to the list, mailman immediately
rejected his messages as he were a non-member.
While investigating the problem, I discovered that his subscription
has some control chars in the end of his email address. In the
"Membership List" option of the admin web interface, the link to his
subscription settings points to sth like this:
https://host.tld/mailman/options/mylist/user--at--host.tld%0D%0A
(note the 0x0d0a)
If I try to unsubscribe him, I get an error page:
Traceback (most recent call last):
File "/usr/local/mailman/scripts/driver", line 87, in run_main
main()
File "/usr/local/mailman/Mailman/Cgi/options.py", line 442, in main
mlist.DeleteMember(
File "/usr/local/mailman/Mailman/MailList.py", line 974, in DeleteMember
self.ApprovedDeleteMember(name, whence, admin_notif, userack)
File "/usr/local/mailman/Mailman/MailList.py", line 990, in
ApprovedDeleteMember
self.removeMember(emailaddr)
File "/usr/local/mailman/Mailman/OldStyleMemberships.py", line 220,
in removeMember
self.__assertIsMember(member)
File "/usr/local/mailman/Mailman/OldStyleMemberships.py", line 113,
in __assertIsMember
raise Errors.NotAMemberError, member
NotAMemberError: user at host.tld
The command line interface doesn't work either:
> bin/remove_members mylist user at host.tld
No such member: user at host.tld
I've also followed the instructions at:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.013.htp
(How do I remove a user name or email address with an illegal character in it?)
with no success:
% python -i bin/withlist -l mylist
Loading list mylist (locked)
The variable `m' is the mylist MailList instance
>>> m.removeMember('na,user at host.tld')
Traceback (most recent call last):
File "<console>", line 1, in ?
File "/usr/local/mailman/Mailman/OldStyleMemberships.py", line 220,
in removeMember
self.__assertIsMember(member)
File "/usr/local/mailman/Mailman/OldStyleMemberships.py", line 113,
in __assertIsMember
raise Errors.NotAMemberError, member
NotAMemberError: na,user at host.tld
% python -i bin/withlist -l mylist
Loading list mylist (locked)
The variable `m' is the mylist MailList instance
>>> del m.members['na,user at host.tld']
Traceback (most recent call last):
File "<console>", line 1, in ?
KeyError: na,user at host.tld
% bin/find_members "[^\w\-+ at .%]" mylist > file
% bin/remove_members -f file mylist
No such member: user at host.tld
No such member: found in:
No such member: mylist
I've also applied the badchar.patch from
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1030228&group_id=103,
but as I expected it doesn't solve the problem of removing a malformed
email address.
Does anybody know of another way of removing this email address from
the list?
Thanks,
Hugo
More information about the Mailman-Users
mailing list