Generally, WebMail Pro allows for accessing existing email accounts only; creating new mailboxes on mail servers is not available in the product as it's not supported by standard email protocols. Still, it's possible to implement user signup by integrating with specific server software directly, and we did that in our MailSuite Pro mail server bundle. Also, we've had numerous requests to add similar functionality on cPanel, and as of version 8.2.16, it is available.
To enable user signup for WebMail Pro installed on cPanel, the following requirements are to be met:
-
The product has to be installed from standard ZIP package, it will not work for installations deployed with cPanel installer. We provide illustrated guide for installing WebMail Pro on cPanel.
-
You need to have one or several mail servers added in the product admin area, and in the domains list, include all the domains you wish to enable signup for.
- To configure integration with cPanel, you'll need credentials of either your cPanel account, or root password. If you have configured password change for cPanel, you probably have those details supplied already.
Anyway, edit data/settings/modules/CpanelIntegrator.config.json
so it looks like this:
{
"Disabled": [
false,
"bool",
null,
"Setting to true disables the module"
],
"CpanelHost": [
"127.0.0.1",
"string",
null,
"Hostname of cPanel server the integration is configured for"
],
"CpanelPort": [
"2083",
"string",
null,
"Port number used to connect to cPanel server"
],
"CpanelUser": [
"yourUserHere",
"string",
null,
"User account used for integration with cPanel server"
],
"CpanelPassword": [
"yourPassWordHere",
"string",
null,
"Password of the account used for integration with cPanel server"
],
"UserDefaultQuotaMB": [
50,
"int",
null,
"Default quota of new email accounts created on cPanel"
],
"SupportedServers": [
[
"*"
],
"array",
null,
"List of mail servers the integration applies to, * for all the mail servers"
],
"AllowCreateDeleteAccountOnCpanel": [
false,
"bool",
null,
"Enables managing email accounts from within adminpanel interface of our product"
],
"AllowAliases": [
false,
"bool",
null,
"Enables creating mail aliases from our adminpanel"
],
"ForwardScriptPath": [
"",
"string",
null,
"Filesystem location of custom mail forwarder, defaults to scripts\/process_mail.php file"
]
}
Make sure CpanelUser and CpanelPassword contain actual credentials of your cPanel account allowed to manage email accounts on the domains you need signup for. If you're using root account, CpanelPort should be set to 2087.
Also, make sure to set UserDefaultQuotaMB value to what you wish to be a default mailbox size.
Signup itself is configured in a different file, data/settings/modules/MailSignup.config.json
:
{
"Disabled": [
true,
"bool",
null,
"Setting to true disables the module"
],
"ServerModuleName": [
"MailSignup",
"string",
null,
"Defines name of the module responsible for signup"
],
"HashModuleName": [
"signup",
"string",
null,
"Defines hash of the module responsible for signup"
],
"CustomLogoUrl": [
"",
"string",
null,
"Defines URL of logo image used on signup page"
],
"InfoText": [
"",
"string",
null,
"Defines additional text message shown on signup page"
],
"BottomInfoHtmlText": [
"",
"string",
null,
"Defines bottom text message shown on signup page"
],
"DomainList": [
[],
"array",
null,
"Defines list of domains signup feature is available for"
]
}
Normally, you'll only need to set Disabled to false there, and supply a list of domains, e.g.:
"DomainList": [
["domain1.com", "domain2.com", "domain3.com"],
"array",
null,
"Defines list of domains signup feature is available for"
]
All the domains supplied need to be hosted by this particular cPanel server, cPanel user account you supply must be able to manage emails on those domains, and the domains must be listed in "Mail Servers" section of WebMail Pro admin interface.
URL for signup page is obtained by appending #signup to the installation URL. For example, if you have WebMail at http://domain1.com/mail/
the signup page would be http://domain1.com/mail/#signup
and the interface would look like this:
To complete the registration, user needs to supply display name, login and password. If DomainList has more than one entry, user can select one of those domains from the dropdown list. Upon successful signup, user will be redirected into their account in WebMail Pro interface.
NB: It is strongly recommended to enable reCAPTCHA module to prevent from automated signups.
While by default there's no link for signup page anywhere in WebMail Pro interface, you can add it to the bottom of login page. That's achieved by editing HTML text in BottomInfoHtmlText setting in data/settings/modules/StandardLoginFormWebclient.config.json
configuration file.