[RCD] IMAP ID Bug found in Roundcube 1.0.1 in rcube_imap.php

Tom Sommer mail at tomsommer.dk
Thu Nov 6 16:29:22 CET 2014


Very cool feature :)

Would love to see this fixed and added 

--
Tom Sommer (via iPhone)

> On 06/11/2014, at 16.22, Benoit Panizzon <benoit.panizzon at imp.ch> wrote:
> 
> Hello
> 
> I habe been desperately trying to get Roundcube to send the correct 
> REMOTE_ADDR of the connecting client to a dovecot IMAP Server which supports 
> remote IP logging by x-originating-ip ID command and login_trusted_networks 
> setting.
> As google shows, that not only I had this problems, I share the solution and 
> hope one of the developers reading here could submit that small fix:
> 
> Here are the changes needed for it to work
> 
> rcube_imap.php, define the ident option not only if debugging is enabled, and 
> add x-originating-ip to the array.
> 
>        if ($this->options['debug']) {
>            $this->set_debug(true);
>        } // <= Added
> 
>            $this->options['ident'] = array(
>                'name'    => 'Roundcube',
>                'version' => RCUBE_VERSION,
>                'php'     => PHP_VERSION,
>                'os'      => PHP_OS,
>                'x-originating-ip'      => $_SERVER['REMOTE_ADDR'], // <=Added
>                'command' => $_SERVER['REQUEST_URI'],
>            );
> //        }
> 
> Now this works as expected and dovecot (including it's post-login script) are 
> getting the IP of the connecting webbrowser and not the one of the webserver, 
> if the webserver's IP is in login_trusted_networks.
> 
> Benoit Panizzon
> -- 
> I m p r o W a r e   A G    -    
> ______________________________________________________
> 
> Zurlindenstrasse 29             Tel  +41 61 826 93 07
> CH-4133 Pratteln                Fax  +41 61 826 93 02
> Schweiz                         Web  http://www.imp.ch
> ______________________________________________________
> _______________________________________________
> Roundcube Development discussion mailing list
> dev at lists.roundcube.net
> http://lists.roundcube.net/mailman/listinfo/dev


More information about the dev mailing list