Quoting from Rob MacGregor's mail on Sat, Jan 18, 2003 at 05:15:10PM +0000:
I've run into a problem with an IMAP server that provides STARTTLS, but for
which NO STARTTLS fails:
fetchmail --nosyslog -v -v imap.isp.net
fetchmail: Scratch list of UIDs: <empty>
fetchmail: 6.2.0 querying imap.isp.net (protocol IMAP) at Sat Jan 18
17:03:09 2003: poll started
fetchmail: IMAP< * OK X ISP IMAP service ready
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY STARTTLS IMAP4 IMAP4rev1 LITERAL+ AUTH=LOGIN
AUTH=PLAIN AUTH=EXTERNAL
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: Protocol identified as IMAP4 rev 1
fetchmail: IMAP> A0002 STARTTLS
fetchmail: IMAP< A0002 NO STARTTLS failed
At which point it all hangs. How do I stop fetchmail from trying to
activate TLS?
sslproto ""
I think, only NEWS makes any mention of that.
However, I think this might be a fetchmail bug also. Could you try
this patch?
=========================================================
diff -Naur fetchmail-6.2.0.orig/imap.c fetchmail-6.2.0/imap.c
--- fetchmail-6.2.0.orig/imap.c Fri Jan 17 11:02:49 2003
+++ fetchmail-6.2.0/imap.c Mon Jan 20 17:38:46 2003
@@ -369,12 +369,13 @@
char *realhost;
realhost = ctl->server.via ? ctl->server.via : ctl->server.pollname;
- gen_transact(sock, "STARTTLS");
+ ok = gen_transact(sock, "STARTTLS");
/* We use "tls1" instead of ctl->sslproto, as we want STARTTLS,
* not other SSL protocols
*/
- if (SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck,
ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
+ if (ok == PS_SUCCESS &&
+ SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck,
ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
{
if (!ctl->sslproto && !ctl->wehaveauthed)
{
diff -Naur fetchmail-6.2.0.orig/pop3.c fetchmail-6.2.0/pop3.c
--- fetchmail-6.2.0.orig/pop3.c Fri Jan 17 11:02:49 2003
+++ fetchmail-6.2.0/pop3.c Mon Jan 20 17:38:46 2003
@@ -255,12 +255,13 @@
char *realhost;
realhost = ctl->server.via ? ctl->server.via : ctl->server.pollname;
- gen_transact(sock, "STLS");
+ ok = gen_transact(sock, "STLS");
/* We use "tls1" instead of ctl->sslproto, as we want STLS,
* not other SSL protocols
*/
- if (SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck,
ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
+ if (ok == PS_SUCCESS &&
+ SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck,
ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
{
if (!ctl->sslproto && !ctl->wehaveauthed)
{
=========================================================
--
Sunil Shetye.