From a7abf5b2e9a5820a5971383942d12b2ac426bd3e Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Thu, 2 Jan 2003 05:32:41 +0000 Subject: main(): Treat addresses case-insensitively for grouping purposes. --- cron/mailpasswds | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'cron') diff --git a/cron/mailpasswds b/cron/mailpasswds index a009e92b..2c36313d 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -1,19 +1,19 @@ #! @PYTHON@ # -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software +# along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Send password reminders for all lists to all users. @@ -136,15 +136,13 @@ def main(): for mlist in byhost[host]: listaddr = mlist.GetListEmail() for member in mlist.getMembers(): - # BAW: we group by cpaddress because although it's highly - # likely, there's no guarantee that person@list1 is the same - # as PERSON@list2. Sigh. - cpaddress = mlist.getMemberCPAddress(member) + # Group by the lower-cased address, since Mailman always + # treates person@dom.ain the same as PERSON@dom.ain. password = mlist.getMemberPassword(member) optionsurl = mlist.GetOptionsURL(member) lang = mlist.getMemberLanguage(member) info = (listaddr, password, optionsurl, lang) - userinfo.setdefault(cpaddress, []).append(info) + userinfo.setdefault(member, []).append(info) # Now that we've collected user information for this host, send each # user the password reminder. for addr in userinfo.keys(): -- cgit v1.2.3