Added: write 'Auth failed' to syslog

This commit is contained in:
djmaze 2020-07-07 13:33:38 +02:00
parent 693e0f4c10
commit aa805f9ff9
2 changed files with 10 additions and 8 deletions

View file

@ -984,6 +984,11 @@ class Actions
{
$this->LoggerAuth()->Write($this->compileLogParams($sLine, $oAccount, false, $aAdditionalParams));
}
if ($this->Config()->Get('logs', 'auth_logging', false) && \openlog('rainloop', 0, \LOG_AUTHPRIV))
{
\syslog(\LOG_ERR, $this->compileLogParams('Auth failed: ip={request:ip} user={imap:login}', $oAccount, false, $aAdditionalParams));
\closelog();
}
}
private function getAdminToken() : string