How to Lock and Unlock Zimbra Accounts from Command Line

Share this Article :

Q. One of the account in zimbra mailbox sending spam and zimbra administrator need to lock the account then ask user to reset their current password password immediately. Once password has been reset by end user, email administrator need to unlock back the locked account. As a zimbra administrator, how can i achieve this ?

A. Login to your mailbox system, as a zimbra user, perform the following command :

To lock the account :

[[email protected] ~]# su - zimbra
[[email protected] ~]# zmprov ma [email protected]  zimbraAccountStatus lock

To unlock the account :

[[email protected] ~]# su - zimbra
[[email protected] ~]# zmprov ma [email protected]  zimbraAccountStatus active

Leave a Reply