aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--fetchmail-FAQ.html14
-rw-r--r--fetchmail.man1
-rwxr-xr-xfetchmailconf14
-rw-r--r--pop3.c12
5 files changed, 26 insertions, 17 deletions
diff --git a/NEWS b/NEWS
index e5451b2a..9fc7da76 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ fetchmail-4.5.0 ():
* 1.0 version of fetchmailconf.
* Jochen Hayek's changes to make RPA less verbose.
* Harry McGavran's fix for subdirectory installation.
+* Marty Lee fixed a bug in activation of hosts named on the command-line.
+* The fetchall option forces RETR again. We can cope with USA.NET now.
There are 279 people on fetchmail-friends and 217 on fetchmail-announce.
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 8f604099..4670a569 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -10,7 +10,7 @@
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/06/05 06:08:35 $
+<td width="30%" align=right>$Date: 1998/06/05 17:23:28 $
</table>
<HR>
<H1>Frequently Asked Questions About Fetchmail</H1>
@@ -1184,11 +1184,11 @@ certainly a server bug.<P>
The usa.net servers (at least in their 2.2 version, June 1998) don't
handle the TOP command properly, either. Regardless of the argument
you give it, they retrieve only about 10 lines of the message.
-Because fetchmail uses TOP for message retrieval (in order to avoid
-marking messages seen), this is a problem. The `<CODE>keep</CODE>'
-option causes fetchmail to use ordinary RETR, eliminating this
-problem -- however, it also doesn't delete read mail. You may be able
-to get around this by using the --keep and --flush options together.<P>
+Fetchmail normally uses TOP for message retrieval in order to avoid
+marking messages seen, but `<CODE>fetchall</CODE>' forces it to use
+RETR instead.<P>
+
+So, set the `<CODE>fetchall</CODE>' option.<P>
<hr>
<h2><a name="T10">T10. How can I use fetchmail with HP OpenMail?</a></h2>
@@ -1951,7 +1951,7 @@ Re-ordering messages is a user-agent function, anyway.<P>
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/06/05 06:08:35 $
+<td width="30%" align=right>$Date: 1998/06/05 17:23:28 $
</table>
<P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>
diff --git a/fetchmail.man b/fetchmail.man
index 9d0dcccd..ad05df3b 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -125,6 +125,7 @@ and the mailserver are echoed to stderr. Overrides --silent.
(Keyword: fetchall)
Retrieve both old (seen) and new messages from the mailserver. The
default is to fetch only messages the server has not marked seen.
+Under POP3, this option also forces the use of RETR rather than TOP.
Note that POP2 retrieval behaves as though --all is always on (see
RETRIEVAL FAILURE MODES below) and this option does not work with ETRN.
.TP
diff --git a/fetchmailconf b/fetchmailconf
index 3a7dddd1..01ba5ff9 100755
--- a/fetchmailconf
+++ b/fetchmailconf
@@ -961,16 +961,16 @@ It is strongly recommended that you find a better POP3 server.
"""
if string.find(greetline, "usa.net") > 0:
warnings = warnings + """
-You appear to be using USA.NET's free mail service. This is a problem;
-their POP3 servers, at least as of the 2.2 version in use mid-1998,
-are quite flaky. They seem to require that fetchall be switched on
+You appear to be using USA.NET's free mail service. Their POP3 servers
+(at least as of the 2.2 version in use mid-1998) are quite flaky, but
+fetchmail can compensate. They seem to require that fetchall be switched on
(otherwise you won't necessarily see all your mail, not even new mail).
-They botch the TOP command the fetchmail normally uses for retrieval
+They also botch the TOP command the fetchmail normally uses for retrieval
(it only retrieves about 10 lines rather than the number specified).
+Turning on fetchall will disable the use of TOP.
-It is recommended that you turn on `fetchall' and `keep' on all user
-entries associated with this server. Turning on keep will disable the
-use of TOP.
+Therefore, it is strongly recommended that you turn on `fetchall' on all
+user entries associated with this server.
"""
if string.find(greetline, "QPOP") > 0:
diff --git a/pop3.c b/pop3.c
index f27b3804..ae0d51a0 100644
--- a/pop3.c
+++ b/pop3.c
@@ -234,8 +234,8 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
*/
sleep(3); /* to be _really_ safe, probably need sleep(5)! */
- /* we're peek-capable because the TOP command exists */
- peek_capable = TRUE;
+ /* we're peek-capable if use of TOP is enabled */
+ peek_capable = !(ctl->fetchall || ctl->keep);
/* we're approved */
return(PS_SUCCESS);
@@ -534,6 +534,12 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
* In that case, marking the seen flag is the only way to prevent the
* message from being re-fetched on subsequent runs.
*
+ * Also use RETR if fetchall is on. This gives us a workaround
+ * for servers like usa.net's that bungle TOP. It's pretty
+ * harmless because fetchall guarantees that any message dropped
+ * by an interrupted RETR will be picked up on the next poll of the
+ * site.
+ *
* We take advantage here of the fact that, according to all the
* POP RFCs, "if the number of lines requested by the POP3 client
* is greater than than the number of lines in the body, then the
@@ -543,7 +549,7 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
* accept; it's much lower than the natural value 2147483646 (the maximum
* twos-complement signed 32-bit integer minus 1)
*/
- if (ctl->keep)
+ if (ctl->keep || ctl->fetchall)
gen_send(sock, "RETR %d", number);
else
gen_send(sock, "TOP %d 99999999", number);