]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
[mailman] truc oublié
authorVincent Le Gallic <legallic@crans.org>
Sat, 9 Nov 2013 00:24:31 +0000 (01:24 +0100)
committerVincent Le Gallic <legallic@crans.org>
Sat, 9 Nov 2013 00:24:31 +0000 (01:24 +0100)
mailman_bad_guys.py
mailman_search_and_destroy.py

index 1c0399a3bc49ce57e0cf5f00d86b5dee3a0fb96a..c0867252594c972554745eca218f35a03abd0325 100755 (executable)
@@ -55,9 +55,9 @@ def exterminate(mail, ml):
     l.Save()
     l.Unlock()
 
-def exterminate_this_guy(bad_guy):
+def exterminate_this_guy(bad_guy, dico=None):
     """Trouve les MLs auxquelles est abonné ``bad_guy`` et l'en supprime en demandant confirmation."""
-    mls = get_mls_from_mail(bad_guy)
+    mls = get_mls_from_mail(bad_guy, dico)
     mls.sort()
     if mls:
         print("Exterminating %s from %s" % (bad_guy, ", ".join(mls)))
index 0c6b82b19ceac40a7bc8a20197e9456fd5290640..2a5cbb1871755a7685fc4fd537c162457a1d71bf 100755 (executable)
@@ -47,7 +47,10 @@ def files_to_mails(files):
         if isdelivery:
             results = get_context_and_mail(mail)
             if results:
-                [result] = results
+                if len(results) > 1:
+                    print "hmm, strange, plusieurs matchs :"
+                    print results
+                result = results[0]
                 bad_guys.append(result)
             else:
                 ans = raw_input("Headers not found. Show mail ? ")