]> Pileus Git - ~andy/fetchmail/commitdiff
Allow UIDL recording in fetchall keep mode, to avoid re-fetching messages on subseque...
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 4 Mar 2006 13:51:46 +0000 (13:51 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 4 Mar 2006 13:51:46 +0000 (13:51 -0000)
svn path=/branches/BRANCH_6-3/; revision=4720

NEWS
pop3.c

diff --git a/NEWS b/NEWS
index d2e577198aba72ed9f8e4c442fbfea9dd5387581..70b9441f82e1688f12b17920a60df4744e46c1a3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,9 @@ fetchmail 6.3.3 (not yet released):
   reported by Roger Lynn.
 * fetchmail no longer prints empty lines in verbose mode when using syslog.
 * fetchmail no longer prints UID lists in verbose mode when using syslog.
+* POP3: fetchmail can now use UIDL in fetchall keep mode, to avoid re-fetching
+  the same messages again when the fetchall keyword is removed. Patch by
+  Sunil Shetye.
 
 # CHANGES:
 * --idle can now be specified on the command line, too.
diff --git a/pop3.c b/pop3.c
index b7054de09561aacc4e460fdd14aee65bbfef2359..69a9c6f8cf88d417aa9e71bb488be7489004f338 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -894,7 +894,7 @@ static int pop3_getrange(int sock,
      */
     last = 0;
     *newp = -1;
-    if (*countp > 0 && !ctl->fetchall)
+    if (*countp > 0 && (!ctl->fetchall || ctl->server.uidl))
     {
        int fastuidl;
        char id [IDLEN+1];
@@ -902,6 +902,7 @@ static int pop3_getrange(int sock,
        /* should we do fast uidl this time? */
        fastuidl = ctl->fastuidl;
        if (*countp > 7 &&              /* linear search is better if there are few mails! */
+           !ctl->fetchall &&           /* with fetchall, all uids are required */
            !ctl->flush &&              /* with flush, it is safer to disable fastuidl */
            NUM_NONZERO (fastuidl))
        {