Forum Discussion
graytt
May 11, 2018Nimbostratus
X-Forwarded Rule for SMTP
Hello All,
We have an SMTP virtual server on our f5 Big IP VE 13.1.0 platform. It works without any issues. However, we would like to add a feature. Effectively, the auto-SNAT means the server o...
timvd_372046
Nimbostratus
Hi, did you ever get this script working? Does the source IP appear in the SMTP-header and can you see it with Wireshark like with an XFF? I just ran a test with the above script and I'm not seeing any changes in the SMTP header...
Misty_Spillers
Jan 24, 2019Nimbostratus
I never got it working. On my system it just hangs smtp. This is the script I ended up with but I don't really have a dev background, Just correct syntax/spelling and adjusted for have route domains on my system
when CLIENT_ACCEPTED {
set caddr [getfield [IP::client_addr] % 1]
log local0. "Client addr: $caddr"
STREAM::expression {@^EHLO.*\r\n@@ @^HELO.*\r\n@@}
STREAM::enable
}
when STREAM_MATCHED {
set mstring [STREAM::match]
log local0. "STREAM_MATCHED: string: $mstring"
set replacement [string range $mstring 0 1]
append replacement "LO $caddr\r\n"
log local0. "STREAM_MATCHED: replacement string: $replacement"
STREAM::replace "$mstring $replacement"
event STREAM_MATCHED disable
}
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