Plesk CLI tools - email account mailbox size updation

Plesk CLI tools – email account mailbox size updation

Plesk cli tools are helpful for the system administrators to bulk updations in plesk servers using scripts and it will help to save lots of time. Here I am discussing the plesk cli tool for updating the mailbox quota for an email account.

If we need to update mailbox quota for a few accounts, we can easily do this from plesk front end. But if the count is high, we may need to script it via cli.  Following is the command to update mailbox quota for a single email account. 

plesk bin mail -u steve@example.com -mbox_quota 1G

If number of mail accounts are a large number, then we can take the email account list for all the mail account from all the domains from the following command. 

plesk bin mail  -l

Just filter the list with your domain, here it is “example.com”

plesk bin mail  -l | grep example.com

Using  a for loop to pass each email account from the above list to the quota update command. Here is the exact command for the same. 

for email in $(plesk bin mail  -l | grep example.com) ; do plesk bin mail -u $email  -mbox_quota 1G ; done 

Note : Take a backup for psa before doing this change. So that we can restore the settings, if anything goes wrong. 

Plesk cli tools needs to be done with the help of an experienced linux system administrator to avoid mistakes. You can get in touch with your hosting provider for support or get in touch with our plesk support services for assistance.

Facebook Comments