You can easily install WebMail Pro on a cPanel server.
If you're a hosting provider and wish to offer WebMail Pro to your clients (instead of the current webmail software, or in addition to it), follow the instructions below.
NB: To install v9 of the product using this installation method, an up-to-date version of cPanel is required. Make sure you're on CURRENT or RELEASE version tier.
We've tested this on several cPanel versions including 102 and 104.
Note that current implementation of cPanel makes it impossible to use mobile sync or Web API when WebMail Pro is installed via direct embedding. Try installing from ZIP package instead. If, however, you don't need mobile sync or other advanced features, please feel free to proceed with the current method.
Installing through direct embedding
To begin, download the installer package from here. You can do that using the following command in terminal:
Usually, it's downloaded to /root directory or your home dir on a cPanel server. In either case, extract it to the same location:
unzip ./webmail-cpanel.zip -d webmail-cpanel
unzip ./webmail-cpanel-8.zip -d webmail-cpanel-8
To perform the installation, root access is required. Open the installer directory, make sure that install script has sufficient execute permissions and run it:
chmod a+x ./installer
./installer -t pro -a install
chmod a+x ./installer
./installer -t pro -a install
The installer downloads WebMail Pro package and performs the basic product configuration. The default installation path is /usr/local/cpanel/base/3rdparty/afterlogic.
It is assumed that this is blank installation of WebMail on particular server. In case if existing WebMail installation is found in this folder, installation will be aborted. For upgrading existing installation of WebMail Pro, a different command is required:
./installer -t pro -a upgrade
NB: This will NOT work for upgrading from previous major version of the product. If you already have v7 installed when installing v8 or v9, or if you already have v8 installed when installing v9, the old version needs to be removed first.
While upgrading the existing installation, only files are replaced while all data in the database are kept intact, the database structure is updated if necessary. Thus, you won't lose any existing data created by previous installations of WebMail Pro. And if you choose to remove WebMail installation, that is done with:
./installer -a remove
Troubleshooting the installation
If you get the following error:
ERROR: Internal PHP doesn't have mysqlnd driver for MySQL. Make sure your cPanel is updated to the latest version.
that means your cPanel installation doesn't meet minimal system requirements for version 9 of the product, you should still be able to install version 8 as shown above.
If you get error message of the following kind during the install:
Can't locate YAML/Syck.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5
.) at /usr/local/cpanel/Cpanel/CPAN/YAML/Syck.pm line 8.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/CPAN/YAML/Syck.pm line 8.
Compilation failed in require at /usr/local/cpanel/Cpanel/DataStore.pm line 19.
It means your cPanel installation is not configured for installing third-party modules yet. You can fix that by running the following commands:
perl -MCPAN -e shell
Then, unintall WebMail and try installing it again.
If the following message is displayed when setting up the product:
WARNING! Database tables were not created. Try creating them from AdminPanel.
that means command-line version of PHP doesn't have PDO extension enabled, so the installer couldn't create the database tables. The issue isn't fatal though, you should still be able to create tables from Database settings screen of admin interface, see below on how to access it.
If you get the following error message:
Composer detected issues in your platform:
Your Composer dependencies require the following PHP extensions to be installed: fileinfo
you'll need to log into WHM as root and add fileinfo PHP extension for the PHP version you currently use. As far as we know, it's currently done via "EasyApache 4" menu item of WHM interface.
Then, uninstall WebMail and try installing it again.
If you encounter problem with attaching files, that's typically caused by insufficient permissions over the data directory. You can try something like this to correct the issue:
chmod -R 0777 /usr/local/cpanel/base/3rdparty/afterlogic/webmail/data
Accessing admin interface
Once the installation is complete, WebMail Pro can be accessed at http://domain.com/webmail/. Here, domain.com stands for any domain name hosted by the server (IP address can be used instead). Any customer can access WebMail Pro by adding /webmail/ to their domains. Once logged in, user will get full list of available webmail clients:
Note that you'll need email address created in cPanel to check mail, and you'll also need it to configure the product. To fine-tune WebMail Pro installation, first log in webmail screen as shown above, then log out of user area of WebMail using Logout tool of webmail itself (rather than Logout tool of cPanel) and append /adminpanel/ to URL, to access admin interface. Default admin login is superadmin, default password is empty.
(Note that if you're installing version 8, there's no separate /adminpanel/ URL there, main login page is used.)
Once entered the admin interface, you can replace the trial key (generated by the installer) with your permanent one, change the default password for admin access, and configure the product in any other way you like. This is, however, optional, as the installer sets up the product to the fully operational state.
Alternative installation method
In some cases, using cPanel installer for WebMail Pro might not be suitable: for example, if you don't have root access to the system, or you want to use native login screen of WebMail rather than one offered by cPanel.
The alternative solution is to install a regular package of WebMail Pro. This is done in exactly the same way you would do with any other PHP application: upload it to web directory of a particular domain, setup access permissions, configure the database, etc. Note that /webmail/ directory name is reserved by cPanel itself so you can't use that, but something like /email/, /mail/, /afterlogic/ etc. would work just fine.
And even though WebMail Pro is installed under a specific domain in this scenario, it is still possible to access any email account hosted by that cPanel server.
This approach becomes especially useful if you'd like to use Mobile Sync functionality.
See more at: Installing on cPanel from ZIP package