Forum Discussion

Joroscof_361824's avatar
Joroscof_361824
Icon for Nimbostratus rankNimbostratus
May 18, 2018

iRule to forward traffic based in sender domain

Hi,

 

Unfortunately I don't have a lot of experience with iRules and i have a weird setup which i think needs it.

 

I have an AntiSpam which analyzes the mails and then forward it to the internet and i have added a new domain which will have a different public IP however I'm unsure of how to configure the outside NAT.

 

Antispam - 192.168.1.229 Domains example.gob.pe 200.10.10.11 exampleext.gob.pe 200.10.10.15

 

A colleague suggested i could create an iRule which would determine based on the sender domain to which Virtual Server would send the traffic (one public IP or the other). Do you think this would be a good solution or if there is another one?.

 

Thanks in advance for the help.

 

1 Reply

  • i would try to solve this on your anti-spam appliance, it is much more email / SMTP aware so hopefully can have rules like this.

     

    do you already have this active on the BIG-IP for one domain? or does the BIG-IP just forward all traffic now? or isn't it involved at all?

     

    the general approach would be to collect the SMTP communication till you receive the domain and then choose a pool for the different gateways. but SMTP communication isn't that straight forward like with HTTP which contains the "domain" (Host header) in every request.

     

    so you will end up with something like suggested here: https://devcentral.f5.com/questions/irule-based-on-smtp-receiver-domain

     

    which the question asker there already finds overly complex.