1

Topic: Mass change user quota (LDAP)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.0
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Is there a way (a skript or something else) to change the user quota of a large amount of users? Would be great!

----

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

2

Re: Mass change user quota (LDAP)

Or is it possible to change the user quota out of the bash?

Something like:

ldapadjustuserquota user1@example.com 1084289478

3

Re: Mass change user quota (LDAP)

To change one user's quota, you can do it with `ldapmodify` like this:

*) Create a file "modify.ldif" with below content (of course you need to replace `dn` and `mailQuota` with real values, and it's free to change the file name):

dn: mail=user@domain.com,ou=Users,domainName=domain.com,o=domains,dc=xx,dc=xx
changetype: modify
replace: mailQuota
mailQuota: 1084289478

The `dn` format is hard-coded, you need to replace `mail`, `domainName`, and `dc=xx,dc=xx`.

*) Run ldapmodify with correct bind dn and password:

ldapmodify -x -D 'cn=vmailadmin,dc=xx,dc=xx' -W -f modify.ldif

Once you can update one user's quota, with a little shell scripting, you can do bulk update.

I know you expect an existing shell/python script for this, i will consider writing one later.

4 (edited by alex42 2015-10-16 22:35:16)

Re: Mass change user quota (LDAP)

Sorry but I've got no idea how to write such a script, so I'll wait.

Thanks a lot for your great work!