On 10/15/2012 2:07 PM, Jack Bates wrote:
On 10/12/2012 2:40 AM, Timo Sirainen wrote:
would probably complicate the code. I don't think this would be difficult to implement. Probably just a few lines of code. Yeah, could be useful.
If there's no argument over the last email, confirm and check this patch. It's not the overall logging I would like, but the lmtp code isn't as mature as pop3/imap and the proxy is a quick and dirty on the lmtp code. Both need a good revamp, preferably with x-session support and perhaps logging rip/lip similar to how we do pop3/imap logins. I think we should also work on adjusting all logging for services using x-session to also log the proxy ip. rip,lip,pip. As I get time I'll look at it. This patch is just to keep us from having no useful logging in lmtp proxy. Based on lmtp pid, one can at least follow the connect, the proxy replies, and the disconnect of a session. --- dovecot-2.1.10/src/lmtp/lmtp-proxy.c 2012-10-12 19:46:49.688952484 +0000 +++ dovecot-2.1.10/src/lmtp/lmtp-proxy.c-new 2012-10-12 19:48:51.751932325 +0000 @@ -160,6 +160,8 @@ static bool lmtp_proxy_send_data_replies break; o_stream_send_str(proxy->client_output, t_strconcat(rcpt[i]->reply, "\r\n", NULL)); + i_info("proxy(%s): proxy host=%s: status=%s",rcpt[i]->address, + rcpt[i]->conn->set.host,rcpt[i]->reply); } o_stream_uncork(proxy->client_output); proxy->next_data_reply_idx = i;