Re: [exim] helo_data with interface = with multiple IP's

Pàgina inicial
Delete this message
Reply to this message
Autor: Dave Lugo
Data:  
A: exim-users
Assumpte: Re: [exim] helo_data with interface = with multiple IP's
from spec.txt:

-------------------------------------------------------
-interface-Use: smtp-Type: string list*-Default: unset-
-------------------------------------------------------

This option specifies which interface to bind to when making an outgoing
SMTP
call. The value is an IP address, not an interface name such as "eth0". Do
not
confuse this with the interface address that was used when a message was
received, which is in $received_ip_address, formerly known as
$interface_address. The name was changed to minimize confusion with the
outgoing interface address. There is no variable that contains an outgoing
interface address because, unless it is set by this option, its value is
unknown.

During the expansion of the interface option the variables $host and
$host_address refer to the host to which a connection is about to be made
during the expansion of the string. Forced expansion failure, or an empty
string result causes the option to be ignored. Otherwise, after expansion,
the
string must be a list of IP addresses, colon-separated by default, but the
separator can be changed in the usual way. For example:

interface = <; 192.168.123.123 ; 3ffe:ffff:836f::fe86:a061

The first interface of the correct type (IPv4 or IPv6) is used for the
outgoing
connection. If none of them are the correct type, the option is ignored.
If
interface is not set, or is ignored, the system's IP functions choose
which
interface to use if the host has more than one.


Have you tried '$interface' ?


On Wed, 27 May 2009, J-P Human wrote:
>
> Hi
>
> I'm having trouble getting Exim (4.69) to use the correct outgoing helo
> string when sending via specific IP Addresses.
>
> My system has 2 IP Addresses, 1.2.3.4 and 1.2.3.5 (for this example)
>
> I want the helo name for 1.2.3.4 to be hostname.1234 and for 1.2.3.5 to
> be hostname.1235 when Exim is told to send out via that IP.
>
> I have in my config:
>
> #Global section
> smtp_active_hostname = ${if eq{$interface_address}{1.2.3.5}\
> {hostname.1235}{hostname.1234}}
>
> #Transports
> remote_smtp:
> driver = smtp
> interface =
> ${lookup{$sender_address_domain}lsearch{/etc/exim4/interfaces}
> {$value}{213.133.123.5}}
> helo_data = ${if eq{$interface_address}{1.2.3.5}\
> {hostname.1235}{hostname.1234}}
>
> The Global section seems to work fine and the interface lookup in the
> remote_smtp transport also works fine, however the helo_data does not
> return the desired string it always returns hostname.1234 even if the
> sender domain is setup in /etc/exim4/interfaces.
>
> I have spent a fair amount of time trying various options so any help
> would be appreciated. I do have a work around using multiple transports
> and routers but it seems a bit excessive.
>
> Thanks and Regards
> J-P Human
>
>


-- 
--------------------------------------------------------
Dave Lugo   dlugo@???    LC Unit #260   TINLC
Have you hugged your firewall today?   No spam, thanks.
--------------------------------------------------------
Are you the police?  . . . .  No ma'am, we're sysadmins.