MBF Knowledge Base

How to create/disable/delete a zimbra account using PHP:

Login as Zimbra using su - zimbra

Create PHP file with Zimbra commands.

When you are executing Zimbra command using PHP, use

shell_exec('/opt/zimbra/bin/');

For example:

shell_exec('/opt/zimbra/bin/zmprov sp user@example.com ');

Lastly, add a cron job using crontab -e

*/1 * * * * php /var/www/phpfile.php