summaryrefslogtreecommitdiff
path: root/travis/ext/imap/imap.exp
blob: de254bbd8f05a226a090a81b07e602711e06cdb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
send_user "IMAP test start..."
spawn telnet 127.0.0.1 143

expect "Dovecot ready" {
                send_user "OK: $expect_out(0,string)\n"
} "refused" {
                send_user "connect to POP refused\n"
                exit 1
} timeout {
                send_user "connect to POP timeout\n"
                exit 1
}

send "a1 LOGIN webmaster@something.com p4ssw0rd\n"

expect "a1 OK" {
                send_user "OK, imap works\n"
} "a1 NO*" {
                send_user "auth failed: $expect_out(buffer)\n"
                exit 1
} "error*" {
		send_user "ERROR: $expect_out(buffer)\n"
} timeout {
                send_user "connect to POP timeout\n"
                exit 1
}

exit 0