Josh_Hildebran1
Jul 11, 2006Nimbostratus
SMTP EHLO response
I'd like to make an iRule that looks for a "EHLO " command and simply responds w/ a particular error message.
I've tried to piece together something, but I've come up short, apparently. Can anyone help?
rule FixUP-SMTP {
when CLIENT_ACCEPTED {
TCP::collect
TCP::release
}
when CLIENT_DATA {
set sdata [TCP::payload]
if { $sdata starts_with "EHLO " } {
TCP::respond "500 5.3.3 Unrecognized command\r\n"
reject
} else {
TCP::release
TCP::collect
}
}
}