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.



Commented logs below. I did 3 different types of connections. Let me know what you think. Because I'm logging the proxy host itself, it can be IP or name depending on the configuration. If you like it, want minor changes, additional logging, let me know and I'll adjust the code. As is, this is a one liner.

Jack

Oct 12 19:03:45 compiler dovecot: lmtp(18568): Connect from ::1

Connection succeeds using static proxy to lmtp.example.com (default in this config). Oct 12 19:04:14 compiler dovecot: lmtp(18568): Reply from lmtp.example.com(test): 250 2.5.0 command succeeded

Connection succeeds but user invalid using director mapping
Oct 12 19:04:14 compiler dovecot: lmtp(18568): Reply from 192.168.1.3(test2): 550 5.1.1 <test2> User doesn't exist: test2

Current error reporting
Oct 12 19:04:14 compiler dovecot: lmtp(18568): Error: lmtp client: connect(192.168.1.4, 7025) failed: No route to host

Connection failed and what we returned to client
Oct 12 19:04:14 compiler dovecot: lmtp(18568): Reply from 192.168.1.4(test42): 451 4.4.0 Remote server not answering (connect)

Oct 12 19:04:16 compiler dovecot: lmtp(18568): Disconnect from ::1: Client quit (in reset)


Reply via email to