diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 101442a909ebaafa8d007543ea514ce1fd4a0911..65b23623039d2dcfd002c59e90c2946946cd4301 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -111,7 +111,7 @@ class login_index { //* Check if there are already wrong logins $sql = "SELECT * FROM `attempts_login` WHERE `ip`= '{$ip}' AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1"; $alreadyfailed = $app->db->queryOneRecord($sql); - //* login to much wrong + //* too many failedlogins if($alreadyfailed['times'] > 5) { $error = $app->lng('error_user_too_many_logins'); } else { diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index e81c2de922f75674ccb8f58ab8846785303ef5d4..1913037ae4e9568557274a97b97ac4ff045ce178 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -238,18 +238,18 @@ class monitor_tools { //* The state of the email_quota. $state = 'ok'; - $mailboxes = $app->db->queryAllRecords("SELECT email FROM mail_user WHERE server_id = $server_id"); + $mailboxes = $app->db->queryAllRecords("SELECT email,maildir FROM mail_user WHERE server_id = $server_id"); if(is_array($mailboxes)) { foreach($mailboxes as $mb) { $email = $mb['email']; $email_parts = explode('@',$mb['email']); - $filename = '/var/vmail/'.$email_parts[1].'/'.$email_parts[0].'/.quotausage'; - if(file_exists($filename)) { + $filename = $mb['maildir'].'/.quotausage'; + if(file_exists($filename) && !is_link($filename)) { $quotafile = file($filename); $data[$email]['used'] = trim($quotafile['1']); unset($quotafile); } else { - exec('du -s '.escapeshellcmd('/var/vmail/'.$email_parts[1].'/'.$email_parts[0]),$out); + exec('du -s '.escapeshellcmd($mb['maildir']),$out); $parts = explode(' ',$out[0]); $data[$email]['used'] = intval($parts[0])*1024; unset($out);