cPanel Integration

This manual applies to AfterLogic WebMail Lite PHP (referenced in this document as WebMail).

To integrate WebMail into cPanel, you need to install WebMail on cPanel server and edit a few cPanel scripts.

Files related to cPanel integration are located in webmail/cpanel_integration folders inside WebMail installation package.

List of files and short description of each (in webmail folder of WebMail):

  1. cpanel_integration/cpanel.php - a script which handles requests from cPanel
  2. cpanel_integration/cpanelwmlogo.png – a WebMail logo to be displayed in cPanel webmail selection screen (the screen where the user can select which webmail to use, change email settings, etc)
  3. cpanel_integration/cpanel.x3.index.html - a patch for cpanel/base/webmail/x3/index.html file. This file represents the layout of cPanel webmail selection screen for x3 theme
  4. cpanel_integration/cpanel.x3.index.single.html - a patch for cpanel/base/webmail/x3/index.html file. This file represents the layout of cPanel webmail selection screen for x3 theme with single AfterLogic WebMail
  5. cpanel_integration/cpanel.x.index.html - a patch for cpanel/base/webmail/x/index.html file. This file represents the layout of cPanel webmail selection screen for x theme
  6. cpanel_integration/cpanel.x.index.single.html - a patch for cpanel/base/webmail/x/index.html file. This file represents the layout of cPanel webmail selection screen for x theme with single AfterLogic WebMail
  7. cpanel_integration/cpanel.x.webmaillogin.html - a patch for /cpanel/base/frontend/x/webmaillogin.html file. This file represents the layout of cPanel webmail selection screen for x theme inside WHM itself
  8. cpanel_integration/cpanel.x.webmaillogin.single.html - a patch for /cpanel/base/frontend/x/webmaillogin.html file. This file represents the layout of cPanel webmail selection screen for x theme with single AfterLogic WebMail inside WHM itself

1. AfterLogic WebMail installation

Install AfterLogic WebMail into /usr/local/cpanel/base/wm/ folder. Installation instructions are available here.

After installation complete your /usr/local/cpanel/base/wm/ folder should have the following content:

Do not forget to set read/write permissions for all users (777) for /usr/local/cpanel/base/wm/data/ folder and all its subfolders and set apache.apache as the owner of /usr/local/cpanel/base/wm/data folder and all its contents.

2. cPanel integration

In order to embed AfterLogic WebMail into cPanel webmail screen, we need to modify cPanel's skins. Some files to be modified may be write-protected. In this case you need to run the following command on each file in need to be modified:

	chattr -i <filename>

AfterLogic WebMail can be added to list of available webmails in two ways:

  1. As one more webmail. In this case cPanel will present list available of webmails and AfterLogic WebMail as one of them
  2. 2.As single webmail. In this case AfterLogic WebMail will be the only available webmail, presented by cPanel

What type of installation to choose – is completely up to you.

2.1 cPanel integration. X3 theme

2.1.1 Adding WebMail as one more webmail

Let's make integration with x3 skin (default in cPanel 11).

2.1.2 Adding WebMail as single webmail

Let's make integration with x3 skin (default in cPanel 11).

2.1 cPanel integration. X theme

2.2.1 Adding WebMail as one more webmail

Let's make integration with x skin

2.2.2 Adding WebMail as single webmail

Let's make integration with x skin

2.3 cPanel integration. X theme. Administration area front-end

2.3.1 Adding WebMail as one more webmail

Let's make integration with x skin front-end part

2.3.2 Adding WebMail as single webmail

Let's make integration with x skin front-end part

Do not forget to change attributes back for all files that were modified before

    chattr +i <file name>

We are almost done. Now you can visit

http://your.domain.name/webmail/

in order to see cPanel webmail selection screen presented on the following screen:

AutoLoad feature works too so that you can set AfterLogic WebMail as the default webmail.

If you want to use another cPanel skin, you need to adapt the patch to fit another layout.

3. AfterLogic WebMail AdminPanel

To access AdminPanel, type the URL of AfterLogic WebMail and add /adminpanel. For instance:

http://www.mydomain.com:2095/wm/adminpanel/

Because cPanel may use different port and URL mappings in various configurations, it’s often easier to navigate to http://your.domain.name/webmail/ and then log in AfterLogic WebMail to learn its URL. Now, you can append /adminpanel to that URL to get into AdminPanel.