aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS16
-rw-r--r--etrn.c87
-rw-r--r--fetchmail.c1
-rw-r--r--pop3.c7
4 files changed, 64 insertions, 47 deletions
diff --git a/NEWS b/NEWS
index b1560f15..c1552417 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,17 @@
* Periodically check for listener-up and croak gracefully if it's not.
* Rewrite maps "From: John Smith (Systems) <jsmith@domain>" to
"From: John Smith@my.pop.server (Systems) <jsmith@domain>". Is this
- just GIGO, or should we try to cope
+ just GIGO, or should we try to cope?
+
+Greg Stark <gsstark@mit.edu> writes:
+
+Hm, the --expunge N option only works for IMAP? I suggested back when you
+proposed this that it should work for POP as well by closing and reopening the
+POP connection. That's exactly what I do currently using a shell script
+``while fetchmail --limit 10 ; do : ; done'' But it would be nice if --expunge
+just worked. That would eliminate the race condition with the lock file and it
+would just be all-around pleasing aesthetically.
+
Other TO-DO items:
@@ -19,6 +29,10 @@
Release Notes:
------------------------------------------------------------------------------
+fetchmail-4.3.4 (Sat Nov 22 01:51:41 EST 1997)
+* Yet another attempt on the Compuserve RPA moving target.
+* Fix ETRN code to poll for the fetchmail host if there's no -S option.
+
fetchmail-4.3.3 (Sat Nov 22 01:51:41 EST 1997)
* Robert Hardy <rhardy@webcon.net>'s patch to use IMAP EXAMINE in check mode.
* Alexander Kourakos's patch for cleaner handling of group addresses.
diff --git a/etrn.c b/etrn.c
index d8234dca..3c7d0f5f 100644
--- a/etrn.c
+++ b/etrn.c
@@ -52,54 +52,53 @@ static int etrn_getrange(int sock, struct query *ctl, char *id, int *countp,
*countp = *newp = -1; /* make sure we don't enter the fetch loop */
/*
- * Do it for all nondefault queues in the smtphunt list.
- * We can tell the nondefault ones because they have a TRUE num field.
+ * By default, the hostlist has a single entry, the fetchmail host's
+ * canonical DNS name.
*/
for (qnp = ctl->smtphunt; qnp; qnp = qnp->next)
- if (qnp->val.num)
+ {
+ /* ship the actual poll and get the response */
+ gen_send(sock, "ETRN %s", qnp->id);
+ if ((ok = gen_recv(sock, buf, sizeof(buf))))
+ return(ok);
+
+ /* this switch includes all response codes described in RFC1985 */
+ switch(atoi(buf))
{
- /* ship the actual poll and get the response */
- gen_send(sock, "ETRN %s", qnp->id);
- if ((ok = gen_recv(sock, buf, sizeof(buf))))
- return(ok);
-
- /* this switch includes all response codes described in RFC1985 */
- switch(atoi(buf))
- {
- case 250: /* OK, queuing for node <x> started */
- error(0, 0, "Queuing for %s started", qnp->id);
- break;
-
- case 251: /* OK, no messages waiting for node <x> */
- error(0, 0, "No messages waiting for %s", qnp->id);
- return(PS_NOMAIL);
-
- case 252: /* OK, pending messages for node <x> started */
- case 253: /* OK, <n> pending messages for node <x> started */
- error(0, 0, "Pending messages for %s started", qnp->id);
- break;
-
- case 458: /* Unable to queue messages for node <x> */
- error(0, -1, "Unable to queue messages for node %s",qnp->id);
- return(PS_PROTOCOL);
-
- case 459: /* Node <x> not allowed: <reason> */
- error(0, -1, "Node %s not allowed: %s", qnp->id, buf);
- return(PS_AUTHFAIL);
-
- case 500: /* Syntax Error */
- error(0, -1, "ETRN syntax error");
- return(PS_PROTOCOL);
-
- case 501: /* Syntax Error in Parameters */
- error(0, -1, "ETRN syntax error in parameters");
- return(PS_PROTOCOL);
-
- default:
- error(0, -1, "Unknown ETRN error %d", atoi(buf));
- return(PS_PROTOCOL);
- }
+ case 250: /* OK, queuing for node <x> started */
+ error(0, 0, "Queuing for %s started", qnp->id);
+ break;
+
+ case 251: /* OK, no messages waiting for node <x> */
+ error(0, 0, "No messages waiting for %s", qnp->id);
+ return(PS_NOMAIL);
+
+ case 252: /* OK, pending messages for node <x> started */
+ case 253: /* OK, <n> pending messages for node <x> started */
+ error(0, 0, "Pending messages for %s started", qnp->id);
+ break;
+
+ case 458: /* Unable to queue messages for node <x> */
+ error(0, -1, "Unable to queue messages for node %s",qnp->id);
+ return(PS_PROTOCOL);
+
+ case 459: /* Node <x> not allowed: <reason> */
+ error(0, -1, "Node %s not allowed: %s", qnp->id, buf);
+ return(PS_AUTHFAIL);
+
+ case 500: /* Syntax Error */
+ error(0, -1, "ETRN syntax error");
+ return(PS_PROTOCOL);
+
+ case 501: /* Syntax Error in Parameters */
+ error(0, -1, "ETRN syntax error in parameters");
+ return(PS_PROTOCOL);
+
+ default:
+ error(0, -1, "Unknown ETRN error %d", atoi(buf));
+ return(PS_PROTOCOL);
}
+ }
return(0);
}
diff --git a/fetchmail.c b/fetchmail.c
index 7109a69f..444814df 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -581,7 +581,6 @@ static int load_params(int argc, char **argv, int optind)
def_opts.server.timeout = CLIENT_TIMEOUT;
def_opts.remotename = user;
save_str(&def_opts.smtphunt, FALSE, fetchmailhost);
- save_str(&def_opts.smtphunt, FALSE, "localhost");
def_opts.expunge = 1;
def_opts.server.envskip = 0;
diff --git a/pop3.c b/pop3.c
index a8808836..152d86c3 100644
--- a/pop3.c
+++ b/pop3.c
@@ -107,10 +107,13 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
#ifdef RPA_ENABLE
/*
* CompuServe has changed its RPA behavior. Used to be they didn't
- * accept USER, but I'm told this changed in mid-November.
+ * accept PASS, but I'm told this changed in mid-November.
*/
if (strstr(greeting, "csi.com"))
{
+ /* temporary fix to get back out of cleartext authentication */
+ gen_transact(sock, "PASS %s", "dummypass");
+
/* AUTH command should return a list of available mechanisms */
if (gen_transact(sock, "AUTH") == 0)
{
@@ -128,6 +131,8 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
ctl->password, sock))
return(PS_SUCCESS);
}
+
+ return(PS_AUTHFAIL);
}
#endif /* RPA_ENABLE */