[horde] set bind address for outbound smtp connections

Jan Schneider jan at horde.org
Tue May 26 15:24:36 UTC 2015


Zitat von A. Schulze <sca at andreasschulze.de>:

> Jan Schneider:
>
>> This is possible but you need to specify the configuration  
>> manually. You can add $conf['mailer']['params']['context']  
>> parameters to horde/config/conf.php below the CONFIG END markger.
>
> Jan,
>
> looks like it should work but doesn't :-/
>
> I added this to ~horde/config/conf.php:
>
> /* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
> $conf['mailer']['params']['context']['bindto'] = '[2001:bd8::1]:0';
> $conf['mailer']['params']['debug'] = '/tmp/smtp.log';
>
> I also extended the debug-statement before  
> /usr/share/php/Horde/Smtp.php, around line 391
>             $foo = print_r($this->getParam('context'), true);
>             $this->_debug->info(sprintf(
>                 'Connection to: smtp://%s:%s from %s',
>                 $this->getParam('host'),
>                 $this->getParam('port'), $foo
>             ));
>
> Finaly I wrote uppercase letters in  
> $conf['mailer']['params']['host'] = 'mail.eXAMPle.org';
> Now I went to /horde/services/problems.php, filled the form and  
> pressed "send"
>
> This is /tmp/smtp.log:
>>> Tue, 26 May 2015 16:10:15 +0200
>>> Connection to: smtp://mail.eXAMPle.org:587 from Array
> (
>     [bindto] => [2001:bd8::1]:0
> )
>
> S: 220 ...
>
> but the MTA still get a connection from an other IP then [2001:bd8::1]
> I verified the IP is local by "ip -6 addr show | grep '$ip'...
>
> PHP Version: 5.6.7
>
> Hints?
>
> Thanks.
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org

See if the context parameters are correctly passed to  
stream_context_create() in Horde/Socket/Client.php too.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject



More information about the horde mailing list