Merge pull request #190 from simonpl/master
Add timeout for password-driver vpopmaild
| | |
| | | |
| | | 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 |
| | | ------------- |
| | |
| | | // 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 |
| | | // -------------------------- |
| | |
| | | $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)) { |