On 14.8.2013, at 17.37, Reindl Harald <h.reindl@thelounge.net> wrote:
login_log_format_elements = user=<%u> method=%m rip=%r %k
is it possible to get rid of the "proxy(test@testserver.rhsoft.net): started proxying to 127.0.0.1:143: " part because on a proxy-only server i know that and it is explicitly not listed in "login_log_format_elements"
Different people want different things logged. I think if I started adding settings to control those from Dovecot configuration it would quickly become a horribly complex mess. An alternative could be to send logging through a more configurable log process. Like perhaps a simple perl log proxy where you can do whatever you want using regexps and such.. This is already possible if someone just writes such a log proxy, although it would be a bit annoying as it would have to implement Dovecot's internal master service protocols. A somewhat easier way would be if Dovecot's log process supported a filtering service, similar to how the mail-filter plugin works for emails. Then you could use whatever scripting language you want to implement the filters and if the filter breaks or is too slow, the log process could just drop it and continue logging without filtering.
The main problem I see with such a generic log filter is that it operates on a full log line string. Maybe for your use case it would be enough, but people have wanted other things as well where such a filter could be helpful, like logging things to SQL database. But there it would be useful to have some kind of key=value pairs of data, like username=foo mailbox=bar without having to parse it from the text, which could be difficult to do 100% correctly. So maybe some day Dovecot's whole logging system could be redesigned to support that as well.
Anyway, all of this is something that I don't see myself having time to implement anytime soon.