[horde] set bind address for outbound smtp connections
A. Schulze
sca at andreasschulze.de
Tue May 26 14:26:04 UTC 2015
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.
More information about the horde
mailing list