Forum Discussion
add IP client for SMTP in v13.1: stream::replace not working
the documentation https://clouddocs.f5.com/api/irules/STREAM_MATCHED.html
seems to indicate you have to do a STREAM::expression in another event or get a match from stream profile, did you do that?
an irule trick i always do is log at the start of an event, there you can check if the STREAM_MATCHED event triggers. if it doesn't that is step one to fix.
when i tested yours on something similar i did indeed not trigger the event at all.
Thank you, it is weird because , only the log local of the client is accepted with real IP. When i enter HELO or EHLO, the stram::expression always is not matched
when CLIENT_ACCEPTED {
set caddr [IP::client_addr]
log local0. "Client addr: $caddr"
STREAM::expression {@^EHLO.*\r\n@@ @^HELO.*\r\n@@}
STREAM::enable
}
when STREAM_MATCHED {
set mstring [STREAM::match]
if { $mstring contains "10.1.2.3" } {
log local0. "STREAM_MATCHED: string: $mstring replaced with $caddr"
STREAM::replace "Client_IP\:$caddr"
STREAM::enable
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
