Debian Codegraph @

awklib/eg/network/mailpopclient.awk

raw
1 BEGIN {
2 POPService = "/inet/tcp/0/var{emailhost}/pop3"
3 RS = ORS = "\r\n"
4 print "user var{name}" |& POPService
5 POPService |& getline
6 print "pass var{password}" |& POPService
7 POPService |& getline
8 print "retr 1" |& POPService
9 POPService |& getline
10 if ($1 != "+OK") exit
11 print "quit" |& POPService
12 RS = "\r\n\\.\r\n"
13 POPService |& getline
14 print $0
15 close(POPService)
16 }