Add username for AUTH success/failure log entry

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@328 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
John Peacock 2004-09-23 16:14:56 +00:00
parent b9646eef75
commit 03455aff9a

View File

@ -316,7 +316,7 @@ sub SASL {
} }
if ( $rc == OK ) { if ( $rc == OK ) {
$msg = "Authentication successful" . $msg = "Authentication successful for $user" .
( defined $msg ? " - " . $msg : "" ); ( defined $msg ? " - " . $msg : "" );
$session->respond( 235, $msg ); $session->respond( 235, $msg );
$session->connection->relay_client(1); $session->connection->relay_client(1);
@ -324,7 +324,7 @@ sub SASL {
return OK; return OK;
} }
else { else {
$msg = "Authentication failed" . $msg = "Authentication failed for $user" .
( defined $msg ? " - " . $msg : "" ); ( defined $msg ? " - " . $msg : "" );
$session->respond( 535, $msg ); $session->respond( 535, $msg );
$session->log( LOGERROR, $msg ); $session->log( LOGERROR, $msg );