Author Topic: send REMOTE_ADDR to IMAP and SMTP  (Read 3058 times)

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
send REMOTE_ADDR to IMAP and SMTP
« on: November 28, 2011, 04:13:58 AM »
The German BNA (Bundesnetzagentur)  requires that the IP from the user is submitted to the IMAP server for monitoring.
 Here is a small workaround for this.

Add in rcube_imap_generic.php by the function login($user, $password)

after this line list($code$response) = $this->execute('LOGIN', array(
            
$this->escape($user), $this->escape($password)), self::COMMAND_CAPABILITY);

this execute command// send remote_address to imap
                
$this->execute('NOOP', array($this->escape($_SERVER['REMOTE_ADDR'])));

For SMTP, the specification of the BNA can be achieved with the additional_message_headers plugin.