Re: [exim] Change IP for different senders

Página Inicial
Delete this message
Reply to this message
Autor: J. R. Haynes
Data:  
Para: technique@dreamhosting.fr
CC: Exim-users
Assunto: Re: [exim] Change IP for different senders



On Tue, 15 Feb 2011, technique@??? wrote:

> Hi
> Is it possible to send email from different IP, depending on email address ?
>
>


We do something similar except we actually select IP based on
domain not individual sender. The following config is therefore
untested but I have just replaced $sender_address_domain with
$sender_address.


Change the remote_smtp driver (assuming you still have this named as
default) to

remote_smtp:
driver = smtp
interface = ${lookup{$sender_address}lsearch{/path/to/file/interfaces} {$value}{aaa.aaa.aaa.xxx}}
helo_data = ${lookup{$sending_ip_address}lsearch{/path/to/file/mailhelo} {$value}{mailout-default.domain.com}}

(This may line wrap when displayed - everything after interface = and
helo_data = are on one line each)


where /path/to/file/interfaces contains
   user1@???:    aaa.aaa.aaa.aaa
   user2@???:    aaa.aaa.aaa.bbb


aaa.aaa.aaa.xxx is the default IP to use for senders who do not appear
in the file.

and /path/to/file/mailhelo contains

aaa.aaa.aaa.aaa: mailout-aaa.domain.com
aaa.aaa.aaa.bbb: mailout-bbb.domain.com

Again mailout-default.domain.com is the entry for the default IP.
These names should correspond to whatever a reverse DNS lookup of the
relevant IP gives. Omitting this means your HELO string will be wrong
for connections not using the default interface. (An alternative to
this is to have the reverse DNS look up to the same name for all
outgoing IPs)

Hope this helps.

Jonathan


-------------------------------------------------------------

                    J. R. Haynes
              Senior Network Specialist


   IT Department,         e-mail: J.Haynes@???
   Bld 63,
   Cranfield University,  Tel: Bedford (01234) 754205
   Wharley End,                Bedford (01234) 750111 Extn 4205
   Cranfield,             Fax: Bedford (01234) 751814
   Beds.,
   MK43 0AL.