diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-09-22 02:00:17 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-09-22 02:00:17 +0000 |
commit | 74eb0be1e799d5485fae6e9c82fddc4d4b785df5 (patch) | |
tree | fc00a64c98bd0f5d70e2c3c5fc447e8060164216 | |
parent | 6e6b976915e8c29bf4684b535addf7bd7d83c8b2 (diff) | |
download | fetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.tar.gz fetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.tar.bz2 fetchmail-74eb0be1e799d5485fae6e9c82fddc4d4b785df5.zip |
Added Todd Sabin's new protocol options.
svn path=/trunk/; revision=2571
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 2 | ||||
-rw-r--r-- | fetchmail.man | 7 | ||||
-rw-r--r-- | imap.c | 19 | ||||
-rw-r--r-- | options.c | 4 | ||||
-rw-r--r-- | rcfile_l.l | 2 |
7 files changed, 34 insertions, 5 deletions
@@ -15,6 +15,9 @@ fetchmail-5.0.9 (): * Federico G. Schwindt's fix for NetBSD/OpenBSD --with-kerberos. * auth keyword and option changed to preauth. * Correct the exit value when .fetchmailrc permissions are wrong. +* getmail/gotmail scripts by Thomas Nesges added to contrib. +* Guenther H. Leber's fix for a ptential uid.c buffer overflow. +* Todd Sabin's option to force IMAP authentication type. There are 264 people on fetchmail-friends and 441 on fetchmail-announce. diff --git a/fetchmail.c b/fetchmail.c index 80a15563..ff465784 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1335,6 +1335,8 @@ static int query_host(struct query *ctl) break; case P_IMAP: case P_IMAP_K4: + case P_IMAP_CRAM_MD5: + case P_IMAP_LOGIN: #ifdef GSSAPI case P_IMAP_GSS: #endif /* GSSAPI */ diff --git a/fetchmail.h b/fetchmail.h index c2b8b17e..20387750 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -15,6 +15,8 @@ #define P_APOP 7 #define P_RPOP 8 #define P_ETRN 9 +#define P_IMAP_CRAM_MD5 10 +#define P_IMAP_LOGIN 11 #if INET6 #define SMTP_PORT "smtp" diff --git a/fetchmail.man b/fetchmail.man index f6d2c24d..66708520 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -190,6 +190,13 @@ with RFC 1731 Kerberos v4 preauthentication. .IP IMAP-GSS IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities) with RFC 1731 GSSAPI preauthentication. +.IP IMAP-CRAMMD5 +IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities) +with RFC 2195 CRAM-MD5 authentication. +.IP IMAP-LOGIN +IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities) +with plain LOGIN authentication only, even if the server supports +better methods. .IP ETRN Use the ESMTP ETRN option. .RE @@ -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 @@ -346,6 +346,10 @@ struct query *ctl; /* option record to be initialized */ else if (strcasecmp(optarg, "imap-gss") == 0) ctl->server.protocol = P_IMAP_GSS; #endif /* GSSAPI */ + else if (strcasecmp(optarg, "imap-crammd5") == 0) + ctl->server.protocol = P_IMAP_CRAM_MD5; + else if (strcasecmp(optarg, "imap-login") == 0) + ctl->server.protocol = P_IMAP_LOGIN; else if (strcasecmp(optarg,"etrn") == 0) ctl->server.protocol = P_ETRN; else { @@ -158,6 +158,8 @@ options {/* EMPTY */} (pop3)|(POP3) { yylval.proto = P_POP3; return PROTO; } (imap-k4)|(IMAP-K4) { yylval.proto = P_IMAP_K4; return PROTO; } (imap-gss)|(IMAP-GSS) { yylval.proto = P_IMAP_GSS; return PROTO; } +(imap-crammd5)|(IMAP-CRAMMD5) { yylval.proto = P_IMAP_CRAM_MD5; return PROTO; } +(imap-login)|(IMAP-LOGIN) { yylval.proto = P_IMAP_LOGIN; return PROTO; } (imap)|(IMAP) { yylval.proto = P_IMAP; return PROTO; } (apop)|(APOP) { yylval.proto = P_APOP; return PROTO; } (etrn)|(ETRN) { yylval.proto = P_ETRN; return PROTO; } |