SMTP Proxy
Problem this snippet solves: This iRule implements a simple SMTP proxy. This is just to show an idea to relay smtp message and to route mail traffic based on FROM or TO... this rule is tested and wo...
Published Mar 18, 2015
Version 1.0CodeCentral_194
Cirrus
Joined May 05, 2019
CodeCentral_194
Cirrus
Joined May 05, 2019
F5_Jeff
Nov 29, 2018Cirrus
Hi,
We are also constructing iRule which will direct traffic on a specific pool if an email was received from "gmail.com" or "google.com"
here is our script:
when CLIENT_ACCEPTED {
log local0. "Client_ACCEPTED_HIT: IP address:[IP::client_addr]"
TCP::respond "220\r\n"
TCP::collect
}
when CLIENT_DATA {
log local0. "Client_DATA_HIT: IP address:[IP::client_addr] Data: [TCP::payload]"
if { [TCP::payload] contains "gmail.com" } {
pool testtesttest
log local0. "cdata_FOUND: IP address:[IP::client_addr] Dest IP:[server_addr]:[server_port] Data: [TCP::payload]"
}
TCP::release
TCP::collect
}
The issue we are having is that, the traffic is not being directed to the specified pool but to the default pool. however, the log "cdata_FOUND:.." can be seen. This mean that the traffic satisfied the "if condition".
This is where we are lost.