aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-01-08 02:06:36 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-01-08 02:06:36 +0000
commitaec7c43d8a1798eb1b134186d0f1b5d010fb7942 (patch)
treea49d0d32916b923f3f90d94f264da77ae1c3d420 /pop3.c
parent5c42b7406d84d51c5a15b1cf5b25f63c7837af64 (diff)
downloadfetchmail-aec7c43d8a1798eb1b134186d0f1b5d010fb7942.tar.gz
fetchmail-aec7c43d8a1798eb1b134186d0f1b5d010fb7942.tar.bz2
fetchmail-aec7c43d8a1798eb1b134186d0f1b5d010fb7942.zip
Remove excess set_peek_capable() call.
Move Maillennium check to before authentication checks to ALWAYS run it. Fix operator precedence bug introduced with adding the "print once" feature and that suppressed the warning. svn path=/branches/BRANCH_6-3/; revision=4614
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/pop3.c b/pop3.c
index facd09fc..e405ea97 100644
--- a/pop3.c
+++ b/pop3.c
@@ -313,6 +313,31 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
has_ssl = FALSE;
#endif /* SSL_ENABLE */
+ /* Set this up before authentication quits early. */
+ set_peek_capable(ctl);
+ /*
+ * The "Maillennium POP3/PROXY server" deliberately truncates
+ * TOP replies after c. 64 or 80 kByte (we have varying reports), so
+ * disable TOP. Comcast once spewed marketing babble to the extent
+ * of protecting Outlook -- pretty overzealous to break a protocol
+ * for that that Microsoft could have read, too. Comcast aren't
+ * alone in using this software though.
+ * <http://lists.ccil.org/pipermail/fetchmail-friends/2004-April/008523.html>
+ * (Thanks to Ed Wilts for reminding me of that.)
+ *
+ * The warning is printed once per server, until fetchmail exits.
+ * It will be suppressed when --fetchall or other circumstances make
+ * us use RETR anyhow.
+ *
+ * Matthias Andree
+ */
+ if (peek_capable && strstr(greeting, "Maillennium POP3/PROXY server")) {
+ if ((ctl->server.workarounds & WKA_TOP) == 0) {
+ report(stdout, GT_("Warning: Maillennium POP3/PROXY server found, using RETR command.\n"));
+ ctl->server.workarounds |= WKA_TOP;
+ }
+ peek_capable = 0;
+ }
if (ctl->server.authenticate == A_SSH) {
return PS_SUCCESS;
}
@@ -610,31 +635,6 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
sleep(3); /* to be _really_ safe, probably need sleep(5)! */
#endif
- set_peek_capable(ctl);
- /*
- * The "Maillennium POP3/PROXY server" deliberately truncates
- * TOP replies after c. 64 or 80 kByte (we have varying reports), so
- * disable TOP. Comcast once spewed marketing babble to the extent
- * of protecting Outlook -- pretty overzealous to break a protocol
- * for that that Microsoft could have read, too. Comcast aren't
- * alone in using this software though.
- * <http://lists.ccil.org/pipermail/fetchmail-friends/2004-April/008523.html>
- * (Thanks to Ed Wilts for reminding me of that.)
- *
- * The warning is printed once per server, until fetchmail exits.
- * It will be suppressed when --fetchall or other circumstances make
- * us use RETR anyhow.
- *
- * Matthias Andree
- */
- if (peek_capable && strstr(greeting, "Maillennium POP3/PROXY server")) {
- if (ctl->server.workarounds & WKA_TOP == 0) {
- report(stdout, GT_("Warning: Maillennium POP3/PROXY server found, using RETR command.\n"));
- ctl->server.workarounds |= WKA_TOP;
- }
- peek_capable = 0;
- }
-
/* we're approved */
return(PS_SUCCESS);
}
@@ -1300,8 +1300,7 @@ int doPOP3 (struct query *ctl)
return(PS_SYNTAX);
}
#endif /* MBOX */
- set_peek_capable(ctl); /* XXX FIXME: is this needed or do we always
- call this from pop3_getauth anyways? */
+
return(do_protocol(ctl, &pop3));
}
#endif /* POP3_ENABLE */