Cisco 11503 Administration Guide - Page 320
IMAP4 Keepalive
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 320 highlights
Script Keepalive Examples Chapter 8 Using the CSS Scripting Language set EXIT_MSG "Waitfor: Failed" ! Wait for the OK welcome message for 200ms socket waitfor ${SOCKET} "+OK" 200 set EXIT_MSG "Send: Failed" ! Send the username to the host socket send ${SOCKET} "USER ${UserName}\n" set EXIT_MSG "Waitfor: Failed" ! Wait for confirmation socket waitfor ${SOCKET} "+OK" 200 set EXIT_MSG "Send: Failed" ! Send the password socket send ${SOCKET} "PASS ${Password}\n" set EXIT_MSG "Waitfor: Failed" ! Wait for confirmation socket waitfor ${SOCKET} "+OK" 200 ! We've successfully logged in, the server is up and going. ! The job was done successfully. socket disconnect ${SOCKET} no set EXIT_MSG exit script 0 IMAP4 Keepalive !no echo Filename: ap-kal-imap4 ! Parameters: HostName UserName Password ! ! Description: ! This script will connect to a IMAP4 server and login with the ! username/password pair specified as argument 2 and 3. After which ! it will log out and return. ! ! Failure Upon: ! 1. Not establishing a connection with the host. ! 2. Not being able to log in with supplied username/password if ${ARGS}[#] "NEQ" "3" echo "Usage: ap-kal-imap4 \'Hostname UserName Password\'" exit script 1 8-52 Cisco Content Services Switch Administration Guide OL-5647-02