aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-06-26 03:36:24 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-06-26 03:36:24 +0000
commit03ab15891b1713d422fce4d7aae581b369822b7e (patch)
treeab648d8f94d520c5ee5da4d8e89e41cd7894c6ef
parent0a7cc64b368172a862a7c970972d5b79e9ecc761 (diff)
downloadfetchmail-03ab15891b1713d422fce4d7aae581b369822b7e.tar.gz
fetchmail-03ab15891b1713d422fce4d7aae581b369822b7e.tar.bz2
fetchmail-03ab15891b1713d422fce4d7aae581b369822b7e.zip
Fix Chris Evert's bug.
svn path=/trunk/; revision=2510
-rw-r--r--NEWS1
-rw-r--r--imap.c18
2 files changed, 10 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 640c91fd..120bbf37 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ fetchmail-5.0.5 ():
* Make the .fetchmail_pid lockfile with O_EXCL. Duhh...
* New FAQ item RH on startup failures under Red Hat 6.0.
* IMAP now skips the authorization step on a PREAUTH response.
+* Fix bug in defaulting of IMAP expunge period with non-LOGIN auth modes.
There are 258 people on fetchmail-friends and 412 on fetchmail-announce.
diff --git a/imap.c b/imap.c
index 491c1b41..39aa3695 100644
--- a/imap.c
+++ b/imap.c
@@ -774,6 +774,15 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
peek_capable = (imap_version >= IMAP4);
+ /*
+ * Assumption: expunges are cheap, so we want to do them
+ * after every message unless user said otherwise.
+ */
+ if (NUM_SPECIFIED(ctl->expunge))
+ expunge_period = NUM_VALUE_OUT(ctl->expunge);
+ else
+ expunge_period = 1;
+
if (preauth)
return(PS_SUCCESS);
@@ -859,15 +868,6 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
if (ok)
return(ok);
- /*
- * Assumption: expunges are cheap, so we want to do them
- * after every message unless user said otherwise.
- */
- if (NUM_SPECIFIED(ctl->expunge))
- expunge_period = NUM_VALUE_OUT(ctl->expunge);
- else
- expunge_period = 1;
-
return(PS_SUCCESS);
}