[ispconfig] Update multiple mail quotas

Discussion in 'Installation/Configuration' started by kiar, Dec 17, 2025 at 11:34 AM.

Tags:
  1. kiar

    kiar New Member

    Hello,
    We have a new server, and I would like to update more than 200 mail quotas (but not all mail quotas).
    I didn't find a way to do it in the interface (and I don't want to go through all mailboxes manually), but maybe is there a way to script it ?
    It's not a problem for me to write it, but I want to be sure that the workflow and the commands are right: i've seen that the quotas are set with maildirmake -q "QUOTA"S MAILDIR USER and written under the table mail_user in the DB.

    Is it right ? or is there another, simplier way to achieve this ?

    Thanks ! :)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Modify them in the ISPConfig database's mail_user table using a SQL query. This should be sufficient if you have a Dovecot system as Dovecot reads them directly from MySQL.
     
  3. kiar

    kiar New Member

    Many thanks @till !
    Yes, we use dovecot, and directly modify the DB would be the perfect solution for us. I'll try it this evening.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If it does not work, you can use Tools > Resync on the mail accounts to force DB data written out to config files again. But I think editing the DB should be sufficient in this case.
     
  5. remkoh

    remkoh Well-Known Member HowtoForge Supporter

    This only works for single node systems I think?
    Or do slave nodes do a scan for changes in the master node's db by themselves and resync?
    Normally you edit the master node db through the panel and than a sync to the slave node the change is for is initiated.
     
  6. kiar

    kiar New Member

    We only have a single node, and I can confirm that editing the mail_user table is sufficient in our case. So I just have to generate the 200 UPDATE SQL statements, adn it will be done.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    It works for single and multiserver. On a multiserver system, you either use Tools > Esync after doing the changes on the master. Or you run the same sql queries on master and slave.
     

Share This Page