Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2004 15:00:54 +0000
From:      Jez Hancock <jez.hancock@munk.nu>
To:        Wayne Pascoe <freebsd-feb@penguinpowered.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Source IP confusion
Message-ID:  <20040217150054.GA49191@users.munk.nu>
In-Reply-To: <20040217140538.GC76770@marvin.penguinpowered.org>
References:  <20040217140538.GC76770@marvin.penguinpowered.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 17, 2004 at 02:05:38PM +0000, Wayne Pascoe wrote:
> The problem I'm having is forcing that application to use its alias for
> outbound connections. Even though the local_interfaces in exim is set to
> 192.168.1.3, when it connects to a machine to deliver mail, that
> connection comes from 192.168.1.2 . 

Have a look at section 13.7 of the exim spec - 13.7 Delivering to a
remote host:

13.7 Delivering to a remote host                                               |
                                                                               |
Delivery to a remote host is handled by the smtp transport. By default, it     |
allows the system's TCP/IP functions to choose which interface to use (if      |
there is more than one) when connecting to a remote host. However, the         |
"interface" option can be set to specify which interface is used. See the      |
description of the smtp transport in chapter 30 for more details.              |

Section 30 details the use of the 'interface' option to specify which
network interface should be used when delivering mail in your exim smtp
transport:

interface                     Type: string list*                Default: unset

    This option specifies which interface to bind to when making an outgoing
    SMTP call. 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 colon-
    separated list of IP addresses, 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.

Given this if you add:

interface = 192.168.0.3

to your smtp transport perhaps this will solve the problem.

I'm not too sure about named, but presumably there is something similar.

Good luck.

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - Another FreeBSD Diary
http://ipfwstats.sf.net/        - ipfw peruser traffic logging



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040217150054.GA49191>