URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [insight/] [expect/] [example/] [vrfy] - Rev 1774
Go to most recent revision | Compare with Previous | Blame | View Log
#!/depot/path/expect -f
# separate address into user and host
regexp (.*)@(.*) $argv ignore user host
log_user 0
set timeout -1
# host might be an mx record, convert to a real host via nslookup
spawn nslookup
expect "> "
send "set query=mx\r"
expect "> "
send "$host\r"
expect {
"No mail exchanger" {}
-re "mail exchanger = (\[^\r]*)" {
set host $expect_out(1,string)
}
}
spawn telnet $host smtp
expect "220*\r\n"
send "vrfy $user\r"
expect "250" {send_user "GOOD\n"} \
"550" {send_user "BAD\n"}
Go to most recent revision | Compare with Previous | Blame | View Log