Autodelete WebMail users on cPanel

If you have WebMail Pro 8 installed on cPanel, you can log into WebMail using any email account which exists on cPanel. There is no need to add user in admin area of WebMail Pro 8 manually, user account will automatically be created in WebMail database.

However, if email account is deleted on cPanel, WebMail Pro 8 has no way to tell that it's deleted, so user account will stay in WebMail database even though it's no longer usable.

The following guidelines offer a way to install a hook on cPanel, ensuring that user account will be automatically deleted from WebMail once the email account is deleted on cPanel.

NB: WebMail Pro 8 can be installed on cPanel server using either cPanel installer, or from a standard package. These guidelines work for both the methods - however, you will need root access to cPanel to perform this kind of configuration.

Download the script, unpack it and place it under dev/ subdirectory of your WebMail Pro 8 installation - or any other direct subdirectory under the installation root. The scripts must have root:root ownership and 755 permissions.