[Dovecot] proxy: get rid of redundant log-informations

Timo Sirainen tss at iki.fi
Sun Sep 22 03:20:35 EEST 2013

On 22.9.2013, at 1.29, Reindl Harald <h.reindl at thelounge.net> wrote:

>>> if fact i would only need "login_log_format = %s" but in case of failed logins
>>> and dictionary attacks with unknown users "%u" is empty - if %u would *always*
>>> contain the used loginname, wether if it was successful or not i would have
>>> any needed information without the duplication

%u always has username as long as client sent it.

>> errta - the problem maybe was in cased of failed logins you see no
>> difference without %$ comapred to a succesfull login
>> login_log_format_elements      = status=%status <%u> %r %m %c
>> login_log_format               = %s
>> would perfectly solve this while %status or whatever placeholder would be failed / success
> sorry for the spam and not put it in one reply
> login_log_format_elements = %status <%u> %r %m %c %cipher
> login_log_format          = %s
> Sep 21 18:39:47 localhost dovecot: imap-login: OK, <rhsoft at test.rh>,, CRAM-MD5, DHE-RSA-CAMELLIA256-SHA
> "TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA" for %k leads to linebreaks in "tail -f" which
> makes it hard to follow while the proposd above contains any needed information and fits
> on a 27" screen in a single line, in case of unencrypted %cipher would be simply supressed
> cat maillog | grep imap | grep "OK, "
> cat maillog | grep imap | grep "failed, "
> cat maillog | grep pop3 | grep "OK, "
> cat maillog | grep pop3 | grep "failed, "

%$ is the status, so you're asking for another status variable. Something like in the attached patch, where you can replace %$ with %{login_status}?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 785 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20130922/9ac02f30/attachment.obj>

More information about the dovecot mailing list