Re: [exim] Scripts/mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mike Cardwell
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Scripts/mail
* on the Wed, Jun 19, 2013 at 03:31:29PM -0300, Adriano Anselmo wrote:

> The emails via scripts enviandos out with the main ip 999.157.999.30. The
> emails via SMTP out with ip 999.157.999.31
> I have a domain which has own IP 999.157.999.33 which makes uploads via
> scripts through a cron, which then sends the ip 999.157.999.30
> I wonder if there is a way that this domain has own IP, the emails are
> enviandos out with him being the ip own.


You should be able to do this in your remote_smtp transport using the
"interface" option. E.g, in the following example, any emails with the sender
address domain "example.com" are sent out from the IP 192.168.0.1, and all
others are sent out from 192.168.0.2:

  remote_smtp:
    driver    = smtp
    interface = ${if eq{$sender_address_domain}{example.com}\
                     {192.168.0.1}{192.168.0.2}}


You should be able to adjust that example for your purposes.

Of course, you would have to have interfaces configured with both of those
IP addresses in order for this to work.

-- 
Mike Cardwell  https://grepular.com/     http://cardwellit.com/
OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3  B0CF 70A5 F512 0018 461F
XMPP OTR Key   8924 B06A 7917 AAF3 DBB1  BF1B 295C 3C78 3EF1 46B4