Welcome! Log In Create A New Profile

Advanced

nginx as an IMAP proxy

André Rodier via nginx
April 18, 2019 05:56AM
Hello,

I have a question for nginx masters.

I am using Debian Stretch, with Dovecot as a mail server, and two
webmails, Roundcube and SOGo. Roundcube is configured to pass the ID
command with the original IP address 'ID ( "x-originating-ip"
xx.xx.xx.xx )', so Dovecot logs the remote IP correctly, and not
127.0.0.1. So, I know my set-up us working fine.

However, there is a bug in SOGo, because the command is sent only after
authentication, and Dovecot logs the remote IP as 127.0.0.1.

Is there any way, by using nginx as an IMAP proxy, to inject the remote
IP address, from an environment variable, passed by the nginx instance
that serves the web frontend?


rip=12.34.56.78 ID (
"x-originating-ip" 12.34.56.78)
[nginx web frontend] => [Sogo backend] => [ nginx IMAP
proxy ] => [Dovecot IMAP server]

I have raised the bug on the SOGo web site, but I think it will be long
to fix, and I prefer to avoid recompiling the SOGo source code.

Thanks for your help and your ideas,
André
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx as an IMAP proxy

André Rodier via nginx April 18, 2019 05:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready