Adding IP address to logs for 535 LOGIN errors, to use with fail2ban (#301)

This commit is contained in:
tlavoie 2021-08-19 15:17:28 -07:00 committed by GitHub
parent 3d40ea7280
commit dc7ac3c696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ sub SASL {
else {
$msg =
uc($mechanism)
. " authentication failed for $user"
. " authentication failed for $user from $ENV{TCPREMOTEIP}"
. ($msg ? " - $msg" : '');
$session->respond(535, $msg);
$session->log(LOGDEBUG, $msg); # already logged by $session->respond