[sysadmin-bin] Generate @gnome.org e-mails for uids part of foundation, emeritus



commit 82f9dfae99f948d6b1fc0e064801bc71eafcdab4
Author: Andrea Veri <averi redhat com>
Date:   Thu Jan 21 15:15:13 2021 +0100

    Generate @gnome.org e-mails for uids part of foundation,emeritus

 mail/export-mail.py                 |  2 +-
 membership/foundation-operations.py | 15 ---------------
 2 files changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/mail/export-mail.py b/mail/export-mail.py
index a20bb64..f05100b 100755
--- a/mail/export-mail.py
+++ b/mail/export-mail.py
@@ -10,7 +10,7 @@ execfile('/home/admin/secret/freeipa_ro')
 
 ALIASES = [
     ('/etc/gnome.org/src-mail/virtual',    'src.gnome.org', ('gnomecvs', 'gnomevcs')),
-    ('/etc/gnome.org/master-mail/aliases', '', 'mailusers'),
+    ('/etc/gnome.org/master-mail/aliases', '', ('foundation', 'emeritus')),
 ]
 
 _cache_email = {}
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 0d05acd..efa4fd1 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -24,10 +24,6 @@ parser.add_option("--automatic-subscriptions",
                   action="store_true", default=False,
                   help="Automatically subscribes new Foundation members to the foundation-announce "
                        "mailing list. To be executed on smtp.gnome.org")
-parser.add_option("--sync-foundation-with-mailusers",
-                  action="store_true", default=False,
-                  help="Make sure foundation LDAP group members are synced to the mailusers group "
-                       "which is then exported through the export-mail.py script")
 parser.add_option("--remove-expired-foundation-members",
                   action="store_true", default=False,
                   help="Foundation membership lasts two years, remove expired members from the "
@@ -79,14 +75,6 @@ def send_renewal_emails():
                 send_form_letters(renewal_form_letter, mail_attr, common_name_attr)
 
 
-def sync_foundation_with_mailusers():
-    mailusers = glu.get_uids_from_group('mailusers')
-
-    for member in foundationmembers:
-        if member not in mailusers:
-            glu.add_user_to_ldap_group(member, 'mailusers')
-
-
 def remove_expired_memberships_from_foundation():
     import dateutil.relativedelta as relativedelta
     delta_2y = relativedelta.relativedelta(years=2)
@@ -395,9 +383,6 @@ def main():
     if options.automatic_subscriptions:
         subscribe_new_members()
 
-    if options.sync_foundation_with_mailusers:
-        sync_foundation_with_mailusers()
-
     if options.remove_expired_foundation_members:
         remove_expired_memberships_from_foundation()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]