Hi all,
I would like to set the outgoing interface to the IP address assigned to the user's domian.
The problem I am encountering is that not all domains have thier MX set to an IP on our server (because some domains are using a mail filtering server that relays the message to our server after filtering).
Is there a way to rewrite the transport's 'interface' lines below, so it will attempt to use the MX, then the A record, then a default IP (the servers main IP) in that order?
remote_smtp_owm:
driver = smtp
helo_data = $sender_address_domain
# interface = ${lookup dnsdb{a=${lookup dnsdb{mxh=$sender_address_domain}}}}
return_path_add = true
remote_smtp_local:
driver = smtp
# interface = ${lookup dnsdb{a=${lookup dnsdb{mxh=$sender_address_domain}}}}
helo_data = $sender_address_domain
return_path_add = true
remote_smtp_alias:
driver = smtp
helo_data = $parent_domain
# interface = ${lookup dnsdb{a=${lookup dnsdb{mxh=$parent_domain}}}}
return_path_add = true
remote_smtp_bounce:
driver = smtp
helo_data = ${lookup dnsdb{defer_never,ptr=$interface_address}{$value}{$primary_hostname}}
# interface = $interface_address
return_path_add = true
-GrantFrom D.H.Davis@??? Tue Oct 06 14:59:59 2009
Envelope-to: exim-users@???
Received: from piquet.bath.ac.uk ([138.38.0.36]:51854)
by tahini.csx.cam.ac.uk with esmtp (Exim 4.69)
(envelope-from <D.H.Davis@???>) id 1MvAZq-0005CC-P0
for exim-users@???; Tue, 06 Oct 2009 14:59:59 +0100
Received: from authenticated user by piquet.bath.ac.uk with esmtpsa
(TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4)
(envelope-from <D.H.Davis@???>) id 1MvAZs-000550-7j
for exim-users@???; Tue, 06 Oct 2009 14:59:44 +0100
Date: Tue, 6 Oct 2009 14:59:41 +0100 (BST)
From: Dennis Davis <D.H.Davis@???>
X-X-Sender: ccsdhd@???
To: exim users <exim-users@???>
In-Reply-To: <4AC9EDB4.5020509@???>
Message-ID: <alpine.BSO.2.01.0910061440580.17908@???>
References: <4AC643E9.4050909@???> <4AC6485B.60204@???>
<20091005124222.56f8601c@???>
<4AC985F5.3020001@???>
<3DA9E7DD91800C4A0036CF06@???>
<4AC9EDB4.5020509@???>
User-Agent: Alpine 2.01 (BSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset£-ASCII
X-kerberosV-authenticator: ccsdhd@???
X-BUCS: ccsdhd
X-Scanner: 86e363c95ba8d006f30a7f9d93a6bdc39a55dd8b
X-Spam-Score: -1.8 (-)
X-Spam-Status: No, scoreÑ.8 required~0 tests÷LÐ.347, BAYES_00Ñ.5,
UNPARSEABLE_RELAY.001 autolearnO version^1.8
Subject: Re: [exim] Exim development
X-BeenThere: exim-users@???
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Dennis Davis <D.H.Davis@???>
List-Id: A user list for the exim MTA <exim-users.exim.org>
List-Unsubscribe: <http://lists.exim.org/mailman/listinfo/exim-users>,
<mailto:exim-users-request@exim.org?subject¾subscribe>
List-Archive: <http://lists.exim.org/lurker/list/exim-users.html>
List-Post: <mailto:exim-users@exim.org>
List-Help: <mailto:exim-users-request@exim.org?subjectlp>
List-Subscribe: <http://lists.exim.org/mailman/listinfo/exim-users>,
<mailto:exim-users-request@exim.org?subject¥bscribe>
X-List-Received-Date: Tue, 06 Oct 2009 13:59:59 -0000
On Mon, 5 Oct 2009, W B Hacker wrote:
> From: W B Hacker <wbh@???>
> To: exim users <exim-users@???>
> Cc: Ian Eiloart <iane@???>
> Date: Mon, 5 Oct 2009 13:59:32
> Subject: Re: [exim] Exim development
...
> There is still a domainkeys lib in ports for that also - same
> maintainer, sky@???
>
> I haven't checked NetBSD, OpenBSD, DragonFlyBSD, but 'pkgsrc' may
> well have the DKIM option also.
There's no port of libdkim in the ports system for OpenBSD4.5.
A recent ports snapshot doesn't include it, so it looks like it
won't be in OpenBSD4.6. Obviously there'll be no libdkim-flavoured
version of exim in OpenBSD4.5/6.
The above's not a problem. libdkim-1.0.17 won't compile out of the
box on OpenBSD4.5. It fails with the error:
dkimverify.cpp: In member function `int SelectorInfo::Parse(char*)':
dkimverify.cpp:1199: error: invalid conversion from `const unsigned char**' to
`unsigned char**'
gmake: *** [dkimverify.o] Error 1
(The above is with gcc (GCC) 3.3.5 (propolice), later versions of
gcc may be more lenient.)
The fix is simple:
--- dkimverify.cpp.orig Wed Apr 2 12:42:08 2008
+++ dkimverify.cpp Tue Oct 6 09:49:47 2009
@@ -1196,7 +1196,7 @@
else
{
unsigned char *PublicKeyData (unsigned char *)values[4];
- EVP_PKEY *pkey 2i_PUBKEY(NULL, ((const unsigned char **)(&PublicKeyData)), PublicKeyLen);
+ EVP_PKEY *pkey 2i_PUBKEY(NULL, ((unsigned char **)(&PublicKeyData)), PublicKeyLen);
if (pkey ðNULL)
return DKIM_SELECTOR_PUBLIC_KEY_INVALID;
so it should be straightforward to build a libdkim-flavoured version
of exim from source.
--
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@??? Phone: +44 1225 386101