From owner-freebsd-questions@FreeBSD.ORG Tue Feb 17 07:00:57 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B867E16A4CE for ; Tue, 17 Feb 2004 07:00:57 -0800 (PST) Received: from munk.nu (mail.munk.nu [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7169F43D1F for ; Tue, 17 Feb 2004 07:00:57 -0800 (PST) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.30; FreeBSD) id 1At6iU-000Cwt-5p; Tue, 17 Feb 2004 15:00:54 +0000 Date: Tue, 17 Feb 2004 15:00:54 +0000 From: Jez Hancock To: Wayne Pascoe Message-ID: <20040217150054.GA49191@users.munk.nu> Mail-Followup-To: Wayne Pascoe , freebsd-questions@freebsd.org References: <20040217140538.GC76770@marvin.penguinpowered.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040217140538.GC76770@marvin.penguinpowered.org> User-Agent: Mutt/1.4.2i Sender: Jez Hancock cc: freebsd-questions@freebsd.org Subject: Re: Source IP confusion X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2004 15:00:57 -0000 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