[Dovecot] Show last mail (pop3, imap) login in web interface
This commit is contained in:
@@ -3170,6 +3170,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
}
|
||||
$mailboxdata = array();
|
||||
$rl = ratelimit('get', 'mailbox', $_data);
|
||||
$last_mail_login = $redis->Get('last-login/' . $_data);
|
||||
if ($last_mail_login === false) {
|
||||
$last_mail_login = '';
|
||||
}
|
||||
$stmt = $pdo->prepare("SELECT
|
||||
`domain`.`backupmx`,
|
||||
`mailbox`.`username`,
|
||||
@@ -3212,6 +3216,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
}
|
||||
$mailboxdata['is_relayed'] = $row['backupmx'];
|
||||
$mailboxdata['name'] = $row['name'];
|
||||
$mailboxdata['last_mail_login'] = $last_mail_login;
|
||||
$mailboxdata['active'] = $row['active'];
|
||||
$mailboxdata['active_int'] = $row['active_int'];
|
||||
$mailboxdata['domain'] = $row['domain'];
|
||||
|
@@ -340,6 +340,7 @@ jQuery(function($){
|
||||
{"name":"spam_aliases","filterable": false,"title":lang.spam_aliases,"breakpoints":"all"},
|
||||
{"name":"tls_enforce_in","filterable": false,"title":lang.tls_enforce_in,"breakpoints":"all"},
|
||||
{"name":"tls_enforce_out","filterable": false,"title":lang.tls_enforce_out,"breakpoints":"all"},
|
||||
{"name":"last_mail_login","breakpoints":"xs sm","formatter":function unix_time_format(tm) { if (tm == '') { return lang.no; } else { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleString(); }},"title":lang.last_mail_login,"style":{"width":"170px"}},
|
||||
{"name":"quarantine_notification","filterable": false,"title":lang.quarantine_notification,"breakpoints":"all"},
|
||||
{"name":"in_use","filterable": false,"type":"html","title":lang.in_use,"sortValue": function(value){
|
||||
return Number($(value).find(".progress-bar").attr('aria-valuenow'));
|
||||
|
@@ -564,6 +564,7 @@
|
||||
"notified": "Benachrichtigt"
|
||||
},
|
||||
"mailbox": {
|
||||
"last_mail_login": "Letzter Mail-Login",
|
||||
"table_size": "Tabellengröße",
|
||||
"table_size_show_n": "Zeige %s Einträge",
|
||||
"tls_policy_maps": "TLS-Richtlinien",
|
||||
|
@@ -563,6 +563,7 @@
|
||||
"notified": "Notified"
|
||||
},
|
||||
"mailbox": {
|
||||
"last_mail_login": "Last mail login",
|
||||
"table_size": "Table size",
|
||||
"table_size_show_n": "Show %s items",
|
||||
"tls_policy_maps": "TLS policy maps",
|
||||
|
Reference in New Issue
Block a user