Remote IP address in dovecot
Hello,
I am using a webmail, SOGo, to access Dovecot mail server in IMAP.
SOGo correctly logs the remote IP address, using the standard nginx headers, especially X-Forwarded-For.
However, when I check the IMAP logs, I see my server's IP address for the "remote_ip" value.
I think there is a way to override this value from the environment, but I could not find it.
Thanks for your help,
-- André Rodier
On 10/03/2024 09:27 EET Andre Rodier via dovecot <dovecot@dovecot.org> wrote:
Hello,
I am using a webmail, SOGo, to access Dovecot mail server in IMAP.
SOGo correctly logs the remote IP address, using the standard nginx headers, especially X-Forwarded-For.
However, when I check the IMAP logs, I see my server's IP address for the "remote_ip" value.
I think there is a way to override this value from the environment, but I could not find it.
Thanks for your help,
-- André Rodier
SOGo has support for this, see https://github.com/Alinto/sogo/commit/256b679798404db77fa85b53df6bcf815c8e40...
On dovecot side, be sure to set
login_trusted_networks = ip-address(es)-of-sogo
even if it's 127.0.0.1
Aki
participants (2)
-
Aki Tuomi
-
Andre Rodier