Forum Discussion

Wes_98712's avatar
Wes_98712
Icon for Nimbostratus rankNimbostratus
Apr 20, 2006

rewrite email address

Anyone know if v9 irules can inspect an email header, and look for a specific invalid rcpt addr (e.g. someone@foo) which is not a fully qualified domain name, but rewrite it to someone@foo.com?

 

 

We have some coders that cheaped out and didn't put the entire email address in, so our email systems are rejecting it, rather than wait wasn't sure if a TCL rule could intercept, rewrite the recipient address and send?

 

 

-Wes

1 Reply

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    iRules certainly has this capability, though it would be a relatively complex rule to write.

     

     

    You'd have to intercept the TCP data, and search through the contents to see if there were a misformed email address (probably with regular expressions) that needed to be transformed into a properly formed address.

     

     

    You'd then, of course, have to know what to do to it to make it whole again. Assuming you only had the one instance where you needed to add ".com" to a domain, this wouldn't pose much of an issue. If you start having multiple conditions that need to be met, I.E. if x, add .com, if y, remove the last two characters and add oo.com, if z add .net, etc., etc., you can see how this would become complex very quickly.

     

     

    If you're going to try this, I'd start by searching the forums, as well as taking a look at the stream profile information on your BIG-IP to see if they can lend some help.

     

     

    Colin