Page 1 of 1

regex.custom.pm specifc user trap

Posted: 05 Dec 2011, 19:59
by Nerigal
Hi,

i made a regex to trap custom fail under dovecot based on specific user that will never exist on my servers

if (( $lgfile eq $config{CUSTOM3_LOG}) and ($line =~ /^\S+\s+\d+\s+\d+\:\d+\:\d+\s+[^\s\.]+\s+dovecot\:\s+pop3\-login\:\s+Disconnected\s+\((auth\s+failed)\,\s+\d+\s+attempts\)\: user\=\<(?:administrator|account|backup|bin|fax|newsletter|news|postgres|root|smtp|staff|training|user|www|web)\>\, method\=PLAIN\,\s+rip\=(\d+\.\d+\.\d+\.\d+), lip=/)) {

return ("custom Failed POP3 login from","$2","pop3d","1","0:65535","1");
}

actually it "work" because i see it in the lfd.log file but the firewall never trigger at 1 fail as it should be...
AND LF_TRIGGER is set to 0

thanks

Re: regex.custom.pm specifc user trap

Posted: 06 Dec 2011, 22:00
by Nerigal
i think i found the answer myself but not sure yet...

in the lfd.conf
elsif ($app eq "pop3d") {$trigger = "LF_POP3D"}

so if your app name match a know app in the lfd.pl it will reset the trigger value by the config file trigger value