1

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
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: change Quota mailbox via script

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

3

Re: change Quota mailbox via script

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

4

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://127.0.0.1:389'
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.

5

Re: change Quota mailbox via script

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