[Mailman-Users] Can't remove illegal members on a list

Jon Carnes jonc at nc.rr.com
Tue Jan 6 20:18:49 CET 2004


On Tue, 2004-01-06 at 12:08, Paul F. Williams wrote:
> I am using mailman-2.1.1-4 on a Redhat 9 Linux system.
> 
> 
> One of my mailman users managed to add a number of addresses
> that are illegal.  You can see their contents using od.
> 
> 
> $ od -a x
> 0000000   a   b   .   t   h   i   s   i   s   a   b   e   m   a   @    a   t
> 0000020   c   p   .   x   t   a   x   e   .   w   i   .   u   s  sp  sp
> 0000040  sp  sp  sp  sp  sp  sp  sp  sp  nl
> 
> 
> 
> 
> When attemping to list the addresses with
> 
>     bin/list_members problem_list
> 
> it fails with
> 
> Traceback (most recent call last):
>    File "bin/list_members", line 232, in ?
>      main()
>    File "bin/list_members", line 207, in main
>      s = formataddr((name, addr)).encode(enc, 'replace')
> UnicodeError: ASCII decoding error: ordinal not in range(128)
> 
> 
> The address appears if you go into the admin page and then select
> the Membership management.
> 
> I tried to delete the address in all the obvious ways several ways, but all 
> failed.
> Using mass deletion from the admin page, it appears to work but it doesn't get
> deleted.
> 
> using
> 
>    bin/remove_members
> 
> also doesn't work since it returns
> 
>    No such member:
> 
> (this was by trying various combinations with extra spaces, nl etc)
> 
> 
> Finally I tried the faq 3.13 which uses python
> 
>     python -i bin/withlist -l problem_list
>  >>> m.removeMember('na,bad at address')
> 
>  >>> m.removeMember('na,bad at daddress     ')
> 
>  >>> m.removeMember('na,"bad at address     "')
> 
> but get the following errors
> 
> 
> The variable `m' is the problem_list MailList instance
>  >>> m.removeMember('na,"bad at address        "')
> Traceback (most recent call last):
>    File "<console>", line 1, in ?
>    File "/var/mailman/Mailman/OldStyleMemberships.py", line 217, in 
> removeMember
>      self.__assertIsMember(member)
>    File "/var/mailman/Mailman/OldStyleMemberships.py", line 113, in 
> __assertIsMember
>      raise Errors.NotAMemberError, member
> NotAMemberError: na,"bad at address
> 
> 
>   I welcome any assistance.
> 
> 
> paulw
> 

Paul,

The easiest way I've found to fix something this FUBoRed is to go in
with a hex editor and exchange bad characters with good ones (always
leaving the same number of characters).

Always backup first, and then go into the file and replace the spaces
with "x"'s and any other odd characters with an "x". Then use the
standard remove command:
  remove_members <listname> ab.thisisabema at atcp.xtaxe.wi.usxxxxxxxxxxnl

Always works, and always works first time!

It's amazing to me how clever some of these mailing list admins are.
It's really a challenge to keep a jump a jump ahead of them.

Good Luck - Jon Carnes






More information about the Mailman-Users mailing list