* 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.
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 */
#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"
.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
{
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
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 {
(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; }