⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.72
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-roundcube
/
plugins
/
reconnect
/
View File Name :
reconnect.php
* @license GPLv3+ */ class reconnect extends rcube_plugin { private $imap_max_attempts; /** * Plugin initialization */ function init() { $this->add_hook('storage_connect', [$this, 'storage_connect']); } /** * Storage_connect hook handler */ function storage_connect($args) { $rcmail = rcmail::get_instance(); $this->load_config(); $this->imap_max_attempts = $rcmail->config->get('reconnect_imap_max_attempts', 5); $args['retry'] = ($args['attempt'] <= $this->imap_max_attempts); if ($args['attempt'] == 1) { return $args; } $storage = rcmail::get_instance()->get_storage(); switch ($storage->get_error_code()) { case rcube_imap_generic::ERROR_NO: case rcube_imap_generic::ERROR_BAD: case rcube_imap_generic::ERROR_BYE: $args['retry'] = false; break; } if ($args['retry']) { // if we do a new attempt, sleep 50 to 150ms before retry. usleep(rand(50*1000, 150*1000)); } return $args; } }