summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/README3
-rw-r--r--plugins/password/config.inc.php.dist3
-rw-r--r--plugins/password/drivers/vpopmaild.php2
3 files changed, 8 insertions, 0 deletions
diff --git a/plugins/password/README b/plugins/password/README
index 262ebfd86..c50eb0bf3 100644
--- a/plugins/password/README
+++ b/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
-------------
diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist
index 8c83dd703..8f7a57f9a 100644
--- a/plugins/password/config.inc.php.dist
+++ b/plugins/password/config.inc.php.dist
@@ -256,6 +256,9 @@ $config['password_vpopmaild_host'] = 'localhost';
// 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
// --------------------------
diff --git a/plugins/password/drivers/vpopmaild.php b/plugins/password/drivers/vpopmaild.php
index 6c1a9ee9d..40731206a 100644
--- a/plugins/password/drivers/vpopmaild.php
+++ b/plugins/password/drivers/vpopmaild.php
@@ -22,6 +22,8 @@ class rcube_vpopmaild_password
$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)) {