Forum Discussion
dsirrine_23403
Nimbostratus
Feb 24, 2011Custom Monitor EAV with Send/Expect script
I am having an issue with my custom monitor where I am attempting to send an e-mail via telnet on port 25 using the send/expect scripted monitor. What I have so far is the following:
send te...
dsirrine_23403
Nimbostratus
Mar 09, 2011I got it to work. I didn't need the initial "send telnet" as the scripted monitor does that to begin with. Unfortunately, I can't use pop/imap/etc as this is to test an exim gateway and can't necessarily "retrieve" the e-mail from the impacted system. doing an "ehlo" on localhost rounds it out nicely. Here's what I ended with:
expect 220
send "HELO localhost\r\n"
expect "250"
send "MAIL FROM: address@localhost\r\n" expect "250"
send "RCPT TO: address@localhost\r\n"
expect "250"
send "DATA\r\n"
expect "354"
send "SUBJECT:F5 LTM SMTP Health Check\r\n"
send "\r\n"
send "This e-mail is generated by the SMTP health check by the F5 LTM.\r\n"
send ".\r\n"
expect "250" send "quit\r\n"
expect "221"
where
= a local account that the mailbox has been redirected to /dev/null. If /var is full, I get an error of not being able to write to spooler, otherwise, I get a 250 OK.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