Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  2 Feb 2002 12:58:44 +0100 (CET)
From:      Matthias Andree <matthias.andree@web.de>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        ve@sci.fi
Subject:   ports/34553: fetchmail can lose mail in POP3+UIDL mode
Message-ID:  <20020202115844.EA0CC49@freebsd.emma.line.org>

next in thread | raw e-mail | index | archive | help

>Number:         34553
>Category:       ports
>Synopsis:       fetchmail can lose mail in POP3+UIDL mode
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 02 04:00:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Andree
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD freebsd.emma.line.org 4.5-STABLE FreeBSD 4.5-STABLE #2: Mon Jan 28 12:00:02 CET 2002 root@freebsd.emma.line.org:/usr/src/sys/compile/M2A2 i386


	
>Description:
Fetchmail, when in POP3+UIDL mode, marks mails as "seen" in its
.fetchids file to prevent mail from being fetched twice. When the local
listener temporarily refuses accepting mail (say, 45x errors from SMTP
listener, disk full or something), the mail is marked as "don't delete"
(suppress_delete), but it's still marked as seen. Consequence: the mail
that could not be delivered will never be retried. If the server is
polled without "keep" option, the mail is lost.

Workaround: always use fetchmail --all.
	
>How-To-Repeat:
Pull mail from a POP3 server with UIDL enabled, deliver to a local SMTP
server which refuses all mail with a 4xx error code (just fill up its
disk). Watch what happens with new mail. Then re-run fetchmail without
--all option, but with the temporary problem resolved, and figure that
the mail that could not be delivered in the previous run will be ignored
as "seen".
	
>Fix:
Update to fetchmail 5.9.7, or, alternatively, stay with 5.9.6 and apply
this patch (I recomment upgrading because fetchmail 5.9.7 has received
other fixes as well):

Index: driver.c
===================================================================
RCS file: /home/emma/mycvsroot/fetchmail/driver.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 driver.c
--- driver.c	2002/01/07 20:42:26	1.1.1.2
+++ driver.c	2002/01/08 01:50:22
@@ -632,8 +632,14 @@
 	 * now.
 	 */
 
-	/* tell the UID code we've seen this */
-	if (ctl->newsaved)
+	/*
+	 * Tell the UID code we've seen this.
+	 * Matthias Andree: only register the UID if we could actually
+	 * forward this mail. If we omit this !suppress_delete check,
+	 * fetchmail will never retry mail that the local listener
+	 * refused temporarily.
+	 */
+	if (ctl->newsaved && !suppress_delete)
 	{
 	    struct idlist	*sdp;

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020202115844.EA0CC49>