for nomal operations
- login_log_format_elements = %r %m %k
- login_log_format = %$: %s
would be perfect because "proxy(h.reindl@thelounge.net)" contains the username *but* in case of auth errors "Disconnected (auth failed, 1 attempts in 2 secs)" does not show the username - hence currently there exists no way to avoid username double-logging in normal operations without render the log unusebale in case auf dictionary attacks / authentication failers
another option would be make %$ obsolete because i do not need to see "proxy(h.reindl@thelounge.net): started proxying to 127.0.0.1:143" because i know that *but* in case of auth errors "%s" doe snot contain any hint of a error and would show "user=h.reindl@thelounge.net, 10.0.0.241, CRAM-MD5, TLS" even with a wrong password and nothing else
that is not really optimal, in case of "tail -f" someone does not want redundant informations leading to linebreaks as well it wastes disk space
Aug 17 13:17:04 mail dovecot: imap-login: proxy(h.reindl@thelounge.net): started proxying to 127.0.0.1:143: user=h.reindl@thelounge.net, 10.0.0.241, CRAM-MD5, TLS
login_log_format_elements = %r %m %k login_log_format = %$: %s
Aug 17 14:31:25 testserver dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): 84.113.45.81, PLAIN
login_log_format_elements = user=<%u> %r %m %c login_log_format = %$: %s
Aug 17 14:29:05 mail dovecot: imap-login: Disconnected (auth failed, 1 attempts in 0 secs): user=h.reindl@thelounge.net, 10.0.0.6, PLAIN