Forum Discussion

Ron_02_140731's avatar
Ron_02_140731
Icon for Nimbostratus rankNimbostratus
Jan 04, 2014

Load balance SMTP traffic to a specific pool member based on the "FROM" mail header

I have a VS consisted of 5 email servers and would like to create an irule that would tell the F5 to route traffic to a pool member based on the "FROM" address. For example:

 

a. user1@acme.com --> mail server 1 b. user2@acme.com --> mail server 2 c. user3@acme.com --> mail server 3 d. user4@acme.com --> mail server 4 e. user5@acme.com --> mail server 5

 

any help would be greatly appreciated!

 

3 Replies

  • Hi Ron, This is really an interesting question.... I would like to know/understand why would you need to do this if all the users are from the same domain, what difference will it bring to your setup? Secondly what if you don't have F5 how you would have achieved such requirement?

     

    Regards,

     

  • thanks for the response. i would say this is more of an application health check to test the email servers from an external lab (to ensure each email server conducts its required checks, scans, delivery, etc)

     

  • If I may add, you'd likely need nothing less than a full SMTP proxy iRule to make this work, which there are several floating around the forum. The "MAIL FROM" message is not the first message in the SMTP connection, so you'd need to buffer all of the data on the client side first, make your determination, and then forward it to the server. For the purposes of a health check, however, there may be other options. You could, for example, create an external SMTP monitor in Bash that sends an email to each pool member on some regular interval (which would then be configured to automatically log and delete the message). Take a look at this solution article for more on that:

     

    http://support.f5.com/kb/en-us/solutions/public/13000/100/sol13180.html?sr=34155522