mirror of https://github.com/mikaku/Monitorix.git
fixed the date format to match UW-IMAP logs and also add POP3 login accounting
This commit is contained in:
parent
5c21ceb612
commit
9353c9d2fd
|
@ -195,7 +195,7 @@ sub serv_update {
|
|||
if(-r $config->{imap_log}) {
|
||||
$config->{imap_log_date_format} = $config->{imap_log_date_format} || "%b %d";
|
||||
my $date_dovecot = strftime($config->{imap_log_date_format}, localtime);
|
||||
my $date_uw = strftime("%b %e %T", localtime);
|
||||
my $date_uw = strftime("%b %e", localtime);
|
||||
open(IN, "$config->{imap_log}");
|
||||
while(<IN>) {
|
||||
# UW-IMAP log
|
||||
|
@ -203,6 +203,9 @@ sub serv_update {
|
|||
if(/ imapd\[/ && / Login user=/) {
|
||||
$imap++;
|
||||
}
|
||||
if(/ ipop3d\[/ && / Login user=/) {
|
||||
$pop3++;
|
||||
}
|
||||
}
|
||||
# Dovecot log
|
||||
if(/$date_dovecot /) {
|
||||
|
|
Loading…
Reference in New Issue