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

Reindl Harald h.reindl at thelounge.net
Sun Sep 22 04:13:10 EEST 2013

Am 22.09.2013 02:20, schrieb Timo Sirainen:
> On 22.9.2013, at 1.29, Reindl Harald <h.reindl at thelounge.net> wrote:
>> 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}?

*exactly* that's it - many thanks!

%{login_status} -> ab[2].value = client->login_success ? "OK" : "Failed";
in case of deeper debugging one can always set "%$" temporary

when we can get rid of "TLSv1 with cipher" and only have the cipher the log would become
really tiny and easy to follow without too much linebreaking - not to forget the logsize
in case of a lot of POP3 users every few minutes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20130922/5f0cda6c/attachment-0001.bin>

More information about the dovecot mailing list