Good morning, I’m trying to use the following iRule to enable my LTM (running v11.1) to play SMTP relay for our new Exchange 2013 servers (see below), yet getting an error (also below). I don’t have much iRule/Scripting experience, so understanding where the syntax issue is has proved challenging. Any help is greatly appreciated.
iRule
when CLIENT_ACCEPTED { set accepted_snat “IP Address”
if { [ class exists smtp_relay_allowed ] } { if { [class match [IP::client_addr] equals “smtp_relay_allowed”] } { snat $accepted_snat } else { snat automap } } else { snat automap } }
Error in Local Traffic log
TCL error: /Common/o365-smtp-relay_irule - can’t read “::smtp_relay_allowed”: no such variable while executing “class match [IP::client_addr] equals $::smtp_relay_allowed”
Thanks!
Jeff B