Forum Discussion
GeneUWG_150657
Nimbostratus
Aug 17, 2016iRule to edit email body
I am using the iApp from https://devcentral.f5.com/wiki/iApp.SMTP-iApp-Template.ashx per the deployment guide at https://www.f5.com/pdf/deployment-guides/f5-smtp-dg.pdf and want to add in an iRule to fix a URL in the body of some emails. Here's my scenario:
- email comes into F5
- iRule checks if from 10.10.0.25
- if no, send on to smtp pool. if yes, go to 4
- check for the hostname.ad.example.com in the body. if found, replace with service.example.com. This string would be in the form of a URL such as https://hostname.ad.example.com/path/to/some/random/page.htm
- send message to pool
I've read up on iRules related to streams and some that use other methods and am just not sure what the best course of action is. Thanks in advance for the help!
1 Reply
- Mohamed_Lrhazi
Altocumulus
Maybe something like this:
when CLIENT_ACCEPTED { if { not [IP::addr [IP::client_addr] equals 10.10.0.25] } { STREAM::expression "@://hostname.ad.example.com@://service.example.com@" STREAM::enable } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects