From owner-freebsd-ports Sat Feb 2 4: 0:22 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D6EA837B404 for ; Sat, 2 Feb 2002 04:00:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g12C05W80240; Sat, 2 Feb 2002 04:00:05 -0800 (PST) (envelope-from gnats) Received: from krusty.e-technik.uni-dortmund.de (krusty.E-Technik.Uni-Dortmund.DE [129.217.163.1]) by hub.freebsd.org (Postfix) with ESMTP id E128437B402 for ; Sat, 2 Feb 2002 03:58:50 -0800 (PST) Received: from emma1.emma.line.org (localhost [127.0.0.1]) by krusty.e-technik.uni-dortmund.de (Postfix) with ESMTP id 039EFA3828 for ; Sat, 2 Feb 2002 12:58:48 +0100 (CET) Received: from freebsd.emma.line.org (freebsd.emma.line.org [192.168.0.4]) by emma1.emma.line.org (Postfix) with ESMTP id 8356AA200C; Sat, 2 Feb 2002 12:58:46 +0100 (CET) Received: by freebsd.emma.line.org (Postfix, from userid 500) id EA0CC49; Sat, 2 Feb 2002 12:58:44 +0100 (CET) Message-Id: <20020202115844.EA0CC49@freebsd.emma.line.org> Date: Sat, 2 Feb 2002 12:58:44 +0100 (CET) From: Matthias Andree Reply-To: Matthias Andree To: FreeBSD-gnats-submit@freebsd.org Cc: ve@sci.fi X-Send-Pr-Version: 3.113 Subject: ports/34553: fetchmail can lose mail in POP3+UIDL mode Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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