Aleksander Machniak
2014-05-16 d6eb889df945bcc9381ad4154b4ec9db9aec0ec3
Merge pull request #190 from simonpl/master

Add timeout for password-driver vpopmaild
3 files modified
8 ■■■■■ changed files
plugins/password/README 3 ●●●●● patch | view | raw | blame | history
plugins/password/config.inc.php.dist 3 ●●●●● patch | view | raw | blame | history
plugins/password/drivers/vpopmaild.php 2 ●●●●● patch | view | raw | blame | history
plugins/password/README
@@ -310,6 +310,9 @@
 Set $config['password_vpopmaild_port'] to the port of vpopmaild.
 Set $config['password_vpopmaild_timeout'] to the timeout used for the TCP
 connection to vpopmaild (You may want to set it higher on busy servers).
 3. Driver API
 -------------
plugins/password/config.inc.php.dist
@@ -256,6 +256,9 @@
// TCP port used for vpopmaild connections
$config['password_vpopmaild_port'] = 89;
// Timout used for the connection to vpopmaild (in seconds)
$config['password_vpopmaild_timeout'] = 10;
// cPanel Driver options
// --------------------------
plugins/password/drivers/vpopmaild.php
@@ -22,6 +22,8 @@
            $rcmail->config->get('password_vpopmaild_port'), null))) {
            return PASSWORD_CONNECT_ERROR;
        }
        $vpopmaild->setTimeout($rcmail->config->get('password_vpopmaild_timeout'),0);
        $result = $vpopmaild->readLine();
        if(!preg_match('/^\+OK/', $result)) {