From 47f54c3820f78d1b74823a40fbeb05d1064a4615 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 1 Mar 2001 19:27:37 +0000 Subject: Notify if we don't have a required capability. svn path=/trunk/; revision=3169 --- imap.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/imap.c b/imap.c index b287ca75..f13ebc84 100644 --- a/imap.c +++ b/imap.c @@ -330,14 +330,28 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) if ((ctl->server.authenticate == A_ANY || ctl->server.authenticate==A_OTP) && strstr(capabilities, "AUTH=X-OTP")) - return(do_otp(sock, ctl); + return(do_otp(sock, ctl)); +#else + if (ctl->server.authenticate==A_NTLM) + { + report(stderr, + _("Required OTP capability not compiled into fetchmail\n")); + return(PS_AUTHFAIL); + } #endif /* OPIE_ENABLE */ #ifdef NTLM_ENABLE if ((ctl->server.authenticate == A_ANY - || ctl->server.authenticate==A_NTLM) + || ctl->server.authenticate==A_NTLM) && strstr (capabilities, "AUTH=NTLM")) - return(do_imap_ntlm(sock, ctl)); + return(do_imap_ntlm(sock, ctl)); +#else + if (ctl->server.authenticate==A_NTLM) + { + report(stderr, + _("Required NTLM capability not compiled into fetchmail\n")); + return(PS_AUTHFAIL); + } #endif /* NTLM_ENABLE */ #ifdef __UNUSED__ /* The Cyrus IMAP4rev1 server chokes on this */ -- cgit v1.2.3