1

Topic: Script to update mail list email all@domain [SOLVED]

We are looking for a script (cron job) or a script to make the mail list and user list align.    As this job is really important and client denied to update by their local team. 

As default, we will create all@domain as default, however it need to add members instead of selecting all domain users in the list.  So the client propose us to write a script to update daily or simply add some rules in new user area so that it will add the member into the default list (all@domain).  Please advice.  Thanks.

Regards,
James

2

Re: Script to update mail list email all@domain [SOLVED]

One of my TODO stuffs in iRedAdmin-Pro-1.2 is allowing admin to specify a mail list in domain profile, and then assign new users to this list automaticly.

You can modify libs/ldaplib/iredldif.py to assign all new users to a mail list:

def ldif_mailuser(domain, username, cn, passwd, quota=cfg.general.get('default_quota'), groups=[]):
    ... SKIP OTHER LINES HERE ...
                                'forward', 'senderbcc', 'recipientbcc',
                                'shadowaddress', 'displayedInGlobalAddressBook',]),
        ('memberOfGroup',      ['all@' + domain]),    # <-- Add this line.
    ]

Warning: Please use SPACE instead of TAB to ident the code block.

3

Re: Script to update mail list email all@domain [SOLVED]

how to this in iredmail-0.7.1