diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-02-10 18:14:56 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-02-10 18:14:56 +0000 |
commit | e36c1a81e06e59855817f79d9b430763acc4d87a (patch) | |
tree | 66a43ab844419b9bd6ff4b7827d1c14b17084e15 /driver.c | |
parent | 68bf9602059968fea6bfa657fe3ff4410ad8f85f (diff) | |
download | fetchmail-e36c1a81e06e59855817f79d9b430763acc4d87a.tar.gz fetchmail-e36c1a81e06e59855817f79d9b430763acc4d87a.tar.bz2 fetchmail-e36c1a81e06e59855817f79d9b430763acc4d87a.zip |
Added RFC1985 ETRN support.
svn path=/trunk/; revision=861
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -1199,19 +1199,22 @@ const struct method *proto; /* protocol method table */ strcpy(realname, ctl->server.names->id); /* try to get authorized to fetch mail */ - shroud = ctl->password; - ok = (protocol->getauth)(sockfp, ctl, buf); - shroud = (char *)NULL; - if (ok == PS_ERROR) - ok = PS_AUTHFAIL; - if (ok != 0) + if (protocol->getauth) { - error(0, 0, "Authorization failure on %s@%s", - ctl->remotename, - realname); - goto cleanUp; + shroud = ctl->password; + ok = (protocol->getauth)(sockfp, ctl, buf); + shroud = (char *)NULL; + if (ok == PS_ERROR) + ok = PS_AUTHFAIL; + if (ok != 0) + { + error(0, 0, "Authorization failure on %s@%s", + ctl->remotename, + realname); + goto cleanUp; + } + vtalarm(ctl->server.timeout); } - vtalarm(ctl->server.timeout); /* compute number of messages and number of new messages waiting */ ok = (protocol->getrange)(sockfp, ctl, &count, &new); @@ -1221,7 +1224,11 @@ const struct method *proto; /* protocol method table */ /* show user how many messages we downloaded */ if (outlevel > O_SILENT) - if (count == 0) + if (count == -1) /* only used for ETRN */ + error(0, 0, "Polling %s@%s", + ctl->remotename, + realname); + else if (count == 0) error(0, 0, "No mail at %s@%s", ctl->remotename, realname); |