Forum Discussion
Ajay_Koushik_19
Apr 06, 2015Nimbostratus
iRule to modify SMTP mail content
Hi,
We have an requirement, where in we need to inspect the incoming SMTP message, look for a particular string and based on that modify the mail content. I have written the below iRule but this is n...
cjunior
May 07, 2015Nacreous
Hi,
I made some changes to see the response from the server and connect direct too. Could you post again the telnet and exchange logs and if possible the VS configuration? Thxwhen CLIENT_ACCEPTED {
log local0. "who was accepted: [IP::client_addr]"
LB::connect
TCP::collect
}
when CLIENT_DATA {
log local0. "sent payload: [TCP::payload]"
switch -glob [TCP::payload] {
"DATA*" {
if { [TCP::payload] ends_with "\r\n.\r\n" } {
if { [string match "*Exchange2010R2*" [TCP::payload]] } {
TCP::payload replace 0 [TCP::payload length] [string map {"Sent From:" "Sent From:\nExchange 2010 R2 Server\n"} [TCP::payload]]
log local0. "new payload: [TCP::payload]"
}
TCP::release
}
}
default {
if { [TCP::payload] ends_with "\r\n" } {
TCP::release
}
}
}
TCP::collect
}
when SERVER_CONNECTED {
log local0. "currently server: [LB::server addr]"
TCP::collect
}
when SERVER_DATA {
log local0. "received payload: [TCP::payload]"
TCP::release
TCP::collect
}
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