Password change for iRedMail

If you run the product along with iRedMail, you can use this plugin to enable password change option in user account settings, so that user can change their email account password.

NB: It is assumed that MySQL database is used for storing account information; this should work for PostgreSQL as well.

iRedMail version required: 0.9.0 or newer (due to SSHA512 hashing used by the plugin)

Upon downloading and extracting plugin package, rename its main directory from:

plugin-afterlogic-iredmail-change-password-master

to:

afterlogic-iredmail-change-password

Then you'll need to deploy the plugin so that its index file is available at the following location:

data/plugins/afterlogic-iredmail-change-password/index.php

To enable the plugin, add the following to array defined in data/settings/config.php file:

'plugins.afterlogic-iredmail-change-password' => true,
'plugins.afterlogic-iredmail-change-password.config.hosts' => '127.0.0.1',
'plugins.afterlogic-iredmail-change-password.config.dbuser' => 'vmailadmin',
'plugins.afterlogic-iredmail-change-password.config.dbpass' => '...'

In the plugin configuration, you need to supply MySQL credentials used by iRedMail to access the database - this may be either root account, or vmailadmin user created by iRedMail when setting up the product.

By default, password change option is only available for the accounts hosted by local mail server. The plugin checks if IMAP server host of the account equals 127.0.0.1 or localhost, and password change will only be enabled for those cases. However, you can reconfigure the plugin to have password change for specific IMAP host or a number of those:

'plugins.afterlogic-iredmail-change-password.config.hosts' => array('imap.host1.com', 'imap.host2.com', 'imap.host3.com')

If there's only one value to supply, it can be specified as an array:

'plugins.afterlogic-iredmail-change-password.config.hosts' => array('imap.host.com')

- or just as a string:

'plugins.afterlogic-iredmail-change-password.config.hosts' => 'imap.host.com'

Additionally, the plugin uses the following parameters supplied in data/settings/settings.xml file:

<PasswordMinLength>6</PasswordMinLength>
<PasswordMustBeComplex>On</PasswordMustBeComplex>

* PasswordMinLength - defines minimal number of characters the password must have;

* PasswordMustBeComplex - if set to On, the password has to include at least one digit and at least one non-alphanumeric character.