[Dovecot] post-login script and original remote ip in proxy mode
Hi,
I am running dovecot on 3 qmail-ldap server backend. dovecot configured to use auth_pop3 wrapper for authentication. Users logins to the qmail-ldap pop3&imap pools randomly. If a user is mailhost is not the connected server, dovecot proxies the connection to the user mailhost. In this case, I can not get the original client IP address via post-logins script on user host. I see only the first connected server IP as $IP environment.
Any idea to get original client IP in this setup with postlogin scripts?
Thanks
On Mon, 2013-05-27 at 23:40 +0300, Ibrahim Harrani wrote:
Hi,
I am running dovecot on 3 qmail-ldap server backend. dovecot configured to use auth_pop3 wrapper for authentication. Users logins to the qmail-ldap pop3&imap pools randomly. If a user is mailhost is not the connected server, dovecot proxies the connection to the user mailhost. In this case, I can not get the original client IP address via post-logins script on user host. I see only the first connected server IP as $IP environment.
Set login_trusted_networks setting pointing to the proxies' IPs/network and you'll get the original IP. Requires v2.1.2+ to work with pop3 proxying.
participants (2)
-
Ibrahim Harrani
-
Timo Sirainen