aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-09-22 02:00:17 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-09-22 02:00:17 +0000
commit74eb0be1e799d5485fae6e9c82fddc4d4b785df5 (patch)
treefc00a64c98bd0f5d70e2c3c5fc447e8060164216 /imap.c
parent6e6b976915e8c29bf4684b535addf7bd7d83c8b2 (diff)
downloadfetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.tar.gz
fetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.tar.bz2
fetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.zip
Added Todd Sabin's new protocol options.
svn path=/trunk/; revision=2571
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/imap.c b/imap.c
index f947c870..24066fa1 100644
--- a/imap.c
+++ b/imap.c
@@ -960,13 +960,22 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
{
if (outlevel >= O_DEBUG)
report (stdout, _("CRAM-MD5 authentication is supported\n"));
- if ((ok = do_cram_md5 (sock, ctl)))
+ if (ctl->server.protocol != P_IMAP_LOGIN)
{
- if (outlevel >= O_MONITOR)
- report (stdout, "IMAP> *\n");
- SockWrite (sock, "*\r\n", 3);
+ if ((ok = do_cram_md5 (sock, ctl)))
+ {
+ if (outlevel >= O_MONITOR)
+ report (stdout, "IMAP> *\n");
+ SockWrite (sock, "*\r\n", 3);
+ }
+ return ok;
}
- return ok;
+ }
+ else if (ctl->server.protocol == P_IMAP_CRAM_MD5)
+ {
+ report(stderr,
+ _("Required CRAM-MD5 capability not supported by server\n"));
+ return(PS_AUTHFAIL);
}
#ifdef NTLM_ENABLE