diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 07:09:57 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-02 07:09:57 +0000 |
| commit | a9b4a030d159738f59e1d782dbf0d17b1a90115f (patch) | |
| tree | 47c5ae62b25f57e7129b4c62bb4d2ffca55f22ae /plugins/password | |
| parent | 6515a57bc35f675616d92eae312e67cbedf3225a (diff) | |
- hMail driver: Add possibility to connect to remote host (patch from Roland Liebl)
git-svn-id: https://svn.roundcube.net/trunk@4165 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/password')
| -rw-r--r-- | plugins/password/README | 24 | ||||
| -rw-r--r-- | plugins/password/config.inc.php.dist | 14 | ||||
| -rw-r--r-- | plugins/password/drivers/hmail.php | 11 | ||||
| -rw-r--r-- | plugins/password/package.xml | 22 |
4 files changed, 55 insertions, 16 deletions
diff --git a/plugins/password/README b/plugins/password/README index 830a14074..a31a0e076 100644 --- a/plugins/password/README +++ b/plugins/password/README @@ -60,7 +60,7 @@ ------------------- You can specify which database to connect by 'password_db_dsn' option and - what SQL query to execute by 'password_query'. See main.inc.php file for + what SQL query to execute by 'password_query'. See main.inc.php.dist file for more info. Example implementations of an update_passwd function: @@ -165,20 +165,20 @@ ------------------------------------- You can specify which host to connect to via 'password_pop_host' and - what port via 'password_pop_port'. See config.inc.php file for more info. + what port via 'password_pop_port'. See config.inc.php.dist file for more info. 2.4. LDAP (ldap) ---------------- - See config.inc.php file. Requires PEAR::Net_LDAP2 package. + See config.inc.php.dist file. Requires PEAR::Net_LDAP2 package. 2.5. DirectAdmin Control Panel (directadmin) -------------------------------------------- - You can specify which host to connect to via 'password_directadmin_host' - and what port via 'password_direactadmin_port'. See config.inc.php file + You can specify which host to connect to via 'password_directadmin_host' + and what port via 'password_direactadmin_port'. See config.inc.php.dist file for more info. @@ -186,14 +186,14 @@ -------------------- You can specify parameters for HTTP connection to cPanel's admin - interface. See config.inc.php file for more info. + interface. See config.inc.php.dist file for more info. 2.7. XIMSS/Communigate (ximms) ------------------------------ You can specify which host and port to connect to via 'password_ximss_host' - and 'password_ximss_port'. See config.inc.php file for more info. + and 'password_ximss_port'. See config.inc.php.dist file for more info. 2.8. Virtualmin (virtualmin) @@ -207,7 +207,9 @@ 2.9. hMailServer (hmail) ------------------------ - Requires PHP COM (Windows only). + Requires PHP COM (Windows only). For access to hMail server on remote host + you'll need to define 'hmailserver_remote_dcom' and 'hmailserver_server'. + See config.inc.php.dist file for more info. 2.10. PAM (pam) @@ -221,7 +223,7 @@ ------------------------- Driver that adds functionality to change the systems user password via - the 'chpasswd' command. See config.inc.php file. + the 'chpasswd' command. See config.inc.php.dist file. Attached wrapper script (chpass-wrapper.py) restricts password changes to uids >= 1000 and can deny requests based on a blacklist. @@ -245,7 +247,8 @@ 2.13. XMail (xmail) ----------------------------------- - Driver for XMail (www.xmailserver.org). See config.inc.php file for configuration description. + Driver for XMail (www.xmailserver.org). See config.inc.php.dist file + for configuration description. 3. Driver API @@ -256,3 +259,4 @@ may return PASSWORD_SUCCESS on success or any of PASSWORD_CONNECT_ERROR, PASSWORD_CRYPT_ERROR, PASSWORD_ERROR when driver was unable to change password. See existing drivers in drivers/ directory for examples. + diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index cf8c4f3d3..b412663ba 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -256,3 +256,17 @@ $rcmail_config['xmail_user'] = 'YourXmailControlUser'; $rcmail_config['xmail_pass'] = 'YourXmailControlPass'; $rcmail_config['xmail_port'] = 6017; + +// hMail Driver options +// ----------------------- +// Remote hMailServer configuration +// true: HMailserver is on a remote box (php.ini: com.allow_dcom = true) +// false: Hmailserver is on same box as PHP +$rcmail_config['hmailserver_remote_dcom'] = false; +// Windows credentials +$rcmail_config['hmailserver_server'] = array( + 'Server' => 'localhost', // hostname or ip address + 'Username' => 'administrator', // windows username + 'Password' => 'password' // windows user password +); + diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php index 764b744fe..f7bddfd08 100644 --- a/plugins/password/drivers/hmail.php +++ b/plugins/password/drivers/hmail.php @@ -3,7 +3,7 @@ /** * hMailserver password driver * - * @version 1.1 + * @version 1.2 - 31.10.2010 * @author Roland 'rosali' Liebl <myroundcube@mail4us.net> * */ @@ -16,10 +16,15 @@ function password_save($curpass, $passwd) return PASSWORD_ERROR; try { - $obApp = new COM('hMailServer.Application'); + $remote = $rcmail->config->get('hmailserver_remote_dcom', false); + if ($remote) + $obApp = new COM("hMailServer.Application", $rcmail->config->get('hmailserver_server')); + else + $obApp = new COM("hMailServer.Application"); } catch (Exception $e) { - write_log('errors', "Plugin password (hmail driver):" . $e->getMessage() . ". This problem is often caused by DCOM permissions not being set."); + write_log('errors', "Plugin password (hmail driver):" . $e->getMessage() + . ". This problem is often caused by DCOM permissions not being set."); return PASSWORD_ERROR; } diff --git a/plugins/password/package.xml b/plugins/password/package.xml index 38aa9c12a..862fdd341 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -15,10 +15,10 @@ <email>alec@alec.pl</email> <active>yes</active> </lead> - <date>2010-10-07</date> + <date>2010-11-02</date> <time>09:00:00</time> <version> - <release>2.0</release> + <release>2.1</release> <api>1.6</api> </version> <stability> @@ -27,7 +27,7 @@ </stability> <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> <notes> -- Fixed SQL Injection in SQL driver when using %p or %o variables in query (#1487034) +- hMail driver: Add possibility to connect to remote host </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -200,5 +200,21 @@ - Added password_ldap_lchattr option (#1486927) </notes> </release> + <release> + <date>2010-10-07</date> + <time>09:00:00</time> + <version> + <release>2.0</release> + <api>1.6</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> + <notes> +- Fixed SQL Injection in SQL driver when using %p or %o variables in query (#1487034) + </notes> + </release> </changelog> </package> |
