Re: [exim] local and remote smtp server

Top Page
Delete this message
Reply to this message
Author: technique@dreamhosting.fr
Date:  
To: Exim-users
Subject: Re: [exim] local and remote smtp server
Hi

Thanks for your replies.

Some lines in exim.conf on SERVER 1 (which prepare emails to send)

interface =
${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces}
{$value}{IP.SER.VER.1}}
helo_data =
${lookup{$sending_ip_address}lsearch{/etc/virtual/interfacesemailsIP}
{$value}{mail.$sender_address_domain}}

Some lines in exim.conf on SERVER 2 (which send emails)

interface =
${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces}
{$value}{IP.SER.VER.2}}
helo_data =
${lookup{$sending_ip_address}lsearch{/etc/virtual/interfacesemailsIP}
{$value}{mail.$sender_address_domain}}


all datas are correct, when I send from domains on SERVER 1


Some lines in exim.conf on SERVER 2 (remote server)
interface =
${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces}
{$value}{IP.SER.VER.2}}
helo_data =
${lookup{$sending_ip_address}lsearch{/etc/virtual/interfacesemailsIP}
{$value}{mail.$sender_address_domain}}

all datas are correct, when I send from domains on SERVER 2 except first
line received

Bad 1st line, because IP on Server 1
Received: from [IP.SER.VER.1] (helo=mail.domain.onserver2.fr) by
name.of.server2.fr (envelope-from <email@???>)

2nd line received is OK (for all emails sent from server1 or 2)

Received: from reverseDNSIP ([IP.SER.VER.2] helo=mail.domain.onserver2.fr)


Some tries :
I change on server1 : interface =
${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces}
{$value}{ANOTHERIP.SER.VER.1}}
Nothing change in emails, it's always IP.SER.VER.1 in first line !

In server1, if I add config lines in /etc/virtual/interfaces or
/etc/virtual/interfacesemailsIP for domains in Server2, it's change nothing.

So I suppose, only exim.conf on Server2 is used.
But what can I change, to not see this bad server1 IP ?

Thanks for your help.
Regards

Hubert

On 2013-09-16 01:15, Phil Pennock wrote:
> On 2013-09-15 at 11:23 +0200, Christoph (Stucki) von Stuckrad wrote:
> > As far as I understand this, it is not possible
> > to select the outgoing IP from 'only one instance'
> > of an exim-daemon (which is, why I did not use
> > the concept at the end, but use only one IP now).
>
> On the SMTP Transport used ("remote_smtp"?) set the `interface` option.
> Despite being called "interface", it's actually a list of IP addresses
> and the first interface of the correct address family (IPv4 or IPv6)
> found is used.
>
> See also $sending_ip_address which is defined for the duration of the
> transport.
>
> ----------------------------8< cut here >8------------------------------
> # in the first section, amongst the macros:
> OUTBOUND_IPADDRESS=<; 2001:db8::48:4558:736d:7470 ; 192.0.2.5
> OUTBOUND_HELONAME=mx.example.org
> #
> # then later in the config file
>
> begin transports
>
> remote_smtp:
> driver = smtp
> interface = OUTBOUND_IPADDRESS
> helo_data = OUTBOUND_HELONAME
> ----------------------------8< cut here >8------------------------------
>
>

--
http://dreamhosting.fr, hébergeur discount.
http://help.dreamhosting.fr/, support/contact dreamhosting
http://dreamad.org, régie pub.
Skype : dreamhosting-tech
Tél : 0960538133
Fax : 0972127568