Timo, Please check the code. I didn't add it, but a real_lip might be useful for some people as well. Also, I notice that pop3-proxy is doing a different xsession than the imap proxy. Is there an xsession standard that is different between the two, or just an oversight in the code? Both send the remote address/port, but only imap proxy sends the local address/port. This patch declares long variable %{real_rip} so that a backend server can declare a different login_log_format_elements login_log_format_elements = user=<%u> method=%m rip=%r lip=%l pip=%{real_rip} mpid=%e %c This is primarily useful for backend servers to log both the rip, lip, and in case of xsession, the real rip. I haven't done extensive testing yet, but as long as nothing does anything weird elsewhere in the code, it should be good. http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patch dovecot: pop3-login: Login: user=<test>, method=PLAIN, rip=192.168.1.5, lip=::1, pip=::1, mpid=8665, secured Jack Bates
Still have some problems with the patch. will have to research it more. Worked fine on localhost, but isn't logging at all for foreign hosts in a production environment. Jack On 10/16/2012 3:43 PM, Jack Bates wrote:> Timo, > > Please check the code. I didn't add it, but a real_lip might be useful > for some people as well. Also, I notice that pop3-proxy is doing a > different xsession than the imap proxy. Is there an xsession standard > that is different between the two, or just an oversight in the code? > Both send the remote address/port, but only imap proxy sends the local > address/port. > > This patch declares long variable %{real_rip} so that a backend server > can declare a different login_log_format_elements > login_log_format_elements = user=<%u> method=%m rip=%r lip=%l > pip=%{real_rip} mpid=%e %c > > This is primarily useful for backend servers to log both the rip, lip, > and in case of xsession, the real rip. I haven't done extensive > testing yet, but as long as nothing does anything weird elsewhere in > the code, it should be good. > > http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patch > > dovecot: pop3-login: Login: user=<test>, method=PLAIN, > rip=192.168.1.5, lip=::1, pip=::1, mpid=8665, secured > > > Jack Bates >
Timo Sirainen
2012-Oct-18 03:23 UTC
[Dovecot] real_rip variable addition for dovecot 2.1.10
On 16.10.2012, at 23.43, Jack Bates wrote:> Please check the code. I didn't add it, but a real_lip might be useful for some people as well. Also, I notice that pop3-proxy is doing a different xsession than the imap proxy. Is there an xsession standard that is different between the two, or just an oversight in the code? Both send the remote address/port, but only imap proxy sends the local address/port. > > This patch declares long variable %{real_rip} so that a backend server can declare a different login_log_format_elements > login_log_format_elements = user=<%u> method=%m rip=%r lip=%l pip=%{real_rip} mpid=%e %c > > This is primarily useful for backend servers to log both the rip, lip, and in case of xsession, the real rip. I haven't done extensive testing yet, but as long as nothing does anything weird elsewhere in the code, it should be good. > > http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patchAdded: http://hg.dovecot.org/dovecot-2.1/rev/92364817f4ba
Possibly Parallel Threads
- Auth cache does not take %real_rip into account
- Re: libvirt beginner needs to create and start VMs entirely on command line
- Where is .xsession-errors
- Re: libvirt beginner needs to create and start VMs entirely on command line
- X11 font -adobe-helvetica size 15 could not be loaded