Plesk: "The specified limit is invalid" when trying to change mailbox quota

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

Plesk web interface is poorly designed and lets you do operations which will break core functionality - for example, you may end up being unable to change mailbox quota.

However, it is still possible to manipulate mailbox quota via MySQL - below, we will change the quota from 100 to 200 MB:

# mysql -u admin --password='secret_plesk_pass'

mysql> use psa;

mysql> select * from Limits where limit_name = 'mbox_quota';                                       
+-----+------------+---------------+
| id  | limit_name | value         |
+-----+------------+---------------+
|   1 | mbox_quota |     104857600 | <--- 100 MB quota
|   3 | mbox_quota |            -1 |
|   4 | mbox_quota |            -1 |
|   5 | mbox_quota |     104857600 | <--- 100 MB quota
|   6 | mbox_quota |     104857600 | <--- 100 MB quota
|   7 | mbox_quota |     102400000 | <---
|  10 | mbox_quota |     104857600 | <---
|  18 | mbox_quota |            -1 |
|  21 | mbox_quota |     102400000 |
|  22 | mbox_quota |            -1 |
|  23 | mbox_quota |     102400000 |
|  26 | mbox_quota |     314572800 |
|  85 | mbox_quota |     102400000 |
|  87 | mbox_quota |            -1 |
|  88 | mbox_quota |            -1 |
|  89 | mbox_quota |            -1 |
|  90 | mbox_quota |            -1 |
|  91 | mbox_quota |            -1 |
|  94 | mbox_quota |     102400000 |
|  95 | mbox_quota |     102400000 |
|  97 | mbox_quota |     524288000 |
(...)

mysql> update Limits set value = 209715200 where limit_name = 'mbox_quota' and value = 102400000;          
Query OK, 15 rows affected (0.03 sec)
Rows matched: 15  Changed: 15  Warnings: 0

mysql> update Limits set value = 209715200 where limit_name = 'mbox_quota' and value = 104857600;
Query OK, 9 rows affected (0.11 sec)
Rows matched: 9  Changed: 9  Warnings: 0