OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [example/] [vrfy] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/depot/path/expect -f
2
 
3
 
4
# separate address into user and host
5
regexp (.*)@(.*) $argv ignore user host
6
 
7
log_user 0
8
set timeout -1
9
 
10
# host might be an mx record, convert to a real host via nslookup
11
spawn nslookup
12
expect "> "
13
send "set query=mx\r"
14
expect "> "
15
send "$host\r"
16
expect {
17
        "No mail exchanger" {}
18
        -re "mail exchanger = (\[^\r]*)" {
19
                set host $expect_out(1,string)
20
        }
21
}
22
 
23
spawn telnet $host smtp
24
expect "220*\r\n"
25
send "vrfy $user\r"
26
expect  "250" {send_user "GOOD\n"} \
27
        "550" {send_user "BAD\n"}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.