"Fossies" - the Fresh Open Source Software Archive

Member "sawdog-2.4/services/imap" (30 Oct 2000, 396 Bytes) of package /linux/privat/old/sawdog-2.4.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/expect -f
    2 
    3 # IMAP4 Expect module for sawdog
    4 
    5 set env(TERM) vt100
    6 
    7 set timeout 8
    8 match_max 100000
    9 
   10 for {set x 0} {$x<3} {incr x} {
   11    spawn telnet $argv imap
   12    expect "Connection refused" {
   13       exit 2
   14    } "Escape character is '^\]'.\r\r" {
   15       expect "* OK" { 
   16          send -- "sawdog NOOP\r"
   17          expect "sawdog OK NOOP" {
   18 	     exit 0
   19 	 }
   20       }
   21    } 
   22    sleep 5
   23 }
   24 exit 1