2 outgoing IPs for two different domains

View: New views
3 Messages — Rating Filter:   Alert me  

2 outgoing IPs for two different domains

by kitty30 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Exim users,

This is my first post, i hope someone can help me finding a solution for this issue.

Im setting up a exim server (using cPanel) and i would like to setup 2 outgoing ip's per domain.
I currently use this method:

interface = 10.0.0.3${eval:${substr{-2}{1}{$tod_zulu}}%1+3}  

That supposes to rotate every outgoing mail sent using the ip's:
10.0.0.3 and 10.0.0.4.

I would like to use this setup for two specific domains only and not for system wide.

Ex; i have two domains i would like to use this method,

domain1 to send outgoing mail using 10.0.0.3 and 10.0.0.4
domain2 to send outgoing mail using 10.0.0.5 and 10.0.0.6

Is there anyway i can accomplish this?


I will highly appreciate any response about this.
Thank you in advance!

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: 2 outgoing IPs for two different domains

by Dan_Mitton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jose,

You might need to do something like come up with separate 'routers' and
separate 'transports' for each domain.  Maybe something like:

routers:

domain1_dnslookup:
  driver    = dnslookup
  domains   = ! +local_domains
  condition = ${if eq{$senderhost_address}{domain1}}
  transport = domain1_remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

domain2_dnslookup:
  driver    = dnslookup
  domains   = ! +local_domains
  condition = ${if eq{$senderhost_address}{domain1}}
  transport = domain2_remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

dnslookup:
  driver    = dnslookup
  domains   = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

transports:

domain1_remote_smtp:
  driver = smtp
  interface = domain1's interface(s)

domain2_remote_smtp:
  driver = smtp
  interface = domain2's interface(s)

remote_smtp:
  driver = smtp
  interface = other interface(s)



Sent by:        exim-users-bounces@...
To:     exim-users@...
cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        [exim] 2 outgoing IPs for two different domains
LSN: Not Relevant
User Filed as: Not a Record

Hello Exim users,

This is my first post, i hope someone can help me finding a solution for
this issue.

Im setting up a exim server (using cPanel) and i would like to setup 2
outgoing ip's per domain.
I currently use this method:

interface = 10.0.0.3${eval:${substr{-2}{1}{$tod_zulu}}%1+3}

That supposes to rotate every outgoing mail sent using the ip's:
10.0.0.3 and 10.0.0.4.

I would like to use this setup for two specific domains only and not for
system wide.

Ex; i have two domains i would like to use this method,

domain1 to send outgoing mail using 10.0.0.3 and 10.0.0.4
domain2 to send outgoing mail using 10.0.0.5 and 10.0.0.6

Is there anyway i can accomplish this?


I will highly appreciate any response about this.
Thank you in advance!

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/




--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: 2 outgoing IPs for two different domains

by W B Hacker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dan_Mitton@... wrote:

> Jose,
>
> You might need to do something like come up with separate 'routers' and
> separate 'transports' for each domain.  Maybe something like:
>
> routers:
>
> domain1_dnslookup:
>   driver    = dnslookup
>   domains   = ! +local_domains
>   condition = ${if eq{$senderhost_address}{domain1}}
>   transport = domain1_remote_smtp
>   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>
> domain2_dnslookup:
>   driver    = dnslookup
>   domains   = ! +local_domains
>   condition = ${if eq{$senderhost_address}{domain1}}
>   transport = domain2_remote_smtp
>   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>
> dnslookup:
>   driver    = dnslookup
>   domains   = ! +local_domains
>   transport = remote_smtp
>   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>   no_more
>
> transports:
>
> domain1_remote_smtp:
>   driver = smtp
>   interface = domain1's interface(s)
>
> domain2_remote_smtp:
>   driver = smtp
>   interface = domain2's interface(s)
>
> remote_smtp:
>   driver = smtp
>   interface = other interface(s)
>
>

Good start, but as the OP wants to alternate use of TWO interfaces per
domain, a toggle or randomizer is also needed.

I'd be tempted to look for odd-even on something already handy, such as
tod ticks or a bit in the last byte of Exim's internal message ID.

Bill


>
> Sent by:        exim-users-bounces@...
> To:     exim-users@...
> cc:      (bcc: Dan Mitton/YD/RWDOE)
> Subject:        [exim] 2 outgoing IPs for two different domains
> LSN: Not Relevant
> User Filed as: Not a Record
>
> Hello Exim users,
>
> This is my first post, i hope someone can help me finding a solution for
> this issue.
>
> Im setting up a exim server (using cPanel) and i would like to setup 2
> outgoing ip's per domain.
> I currently use this method:
>
> interface = 10.0.0.3${eval:${substr{-2}{1}{$tod_zulu}}%1+3}
>
> That supposes to rotate every outgoing mail sent using the ip's:
> 10.0.0.3 and 10.0.0.4.
>
> I would like to use this setup for two specific domains only and not for
> system wide.
>
> Ex; i have two domains i would like to use this method,
>
> domain1 to send outgoing mail using 10.0.0.3 and 10.0.0.4
> domain2 to send outgoing mail using 10.0.0.5 and 10.0.0.6
>
> Is there anyway i can accomplish this?
>
>
> I will highly appreciate any response about this.
> Thank you in advance!
>


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
LightInTheBox - Buy quality products at wholesale price!