Topic: change Quota mailbox via script

==== Required information ====
- iRedMail version: IredAdmin-Pro V1.4.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Linux centos 5.9
- Related log if you're reporting an issue:

Dear All

We want to change all quota email account, is there any script that can do it


Re: change Quota mailbox via script

Unfortunately, no. But you can update LDAP objects directly.


Re: change Quota mailbox via script

could you please inform us where the location of LDAP objects ?


Re: change Quota mailbox via script

I just found old script here:
https://bitbucket.org/zhb/iredmail/src/ … at=default

It should work as expected, but you should update LDAP related info first:

# Note:
#   * bind_dn must have write privilege on LDAP server.
uri = 'ldap://'
basedn = 'o=domains,dc=iredmail,dc=org'
bind_dn = 'cn=vmailadmin,dc=iredmail,dc=org'
bind_pw = 'passwd'

new_quota = 2048   # quota size in MB

Either using 'cn=vmailadmin,dc=xx,dc=xx' or 'cn=Manager,dc=xx,dc=xx' is fine.

WARNING: With "basedn = o=domains,dc=xx,dc=xx", this script will update ALL mail users on your server. If you want to update just one domain, please set base dn to "basedn = domainName=domain.com,o=domains,dc=xx,dc=xx".

Hope it helps.


Re: change Quota mailbox via script

[Solved] Dear Zhang thanks for your information, this case is solved