Bug 107692 - messages are rejected by fetchmail
messages are rejected by fetchmail
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: fetchmail (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-21 23:27 EDT by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version: fetchmail-6.2.5-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-11 13:00:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the mailbox that triggers the bug (13.01 KB, application/x-bzip2)
2003-10-21 23:28 EDT, Alexandre Oliva
no flags Details
Proposed patch (522 bytes, patch)
2004-04-03 08:52 EST, Simon Perreault
no flags Details | Diff
Proposed spec patch (1.19 KB, patch)
2004-04-03 08:55 EST, Simon Perreault
no flags Details | Diff

  None (edit)
Description Alexandre Oliva 2003-10-21 23:27:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031014

Description of problem:
Since the upgrade to -8, fetchmail started rejecting some e-mails that it used
to get perfectly well from a remote imap server.  It prints messages like this:

reading message aoliva@emilia.lsd.ic.unicamp.br:1 of 7 (2077 header octets)
..fetchmail: message delimiter found while scanning headers
 not flushed

and the message remains in the remote mailbox, while I get a message from
FETCHMAIL-DAEMON in my local mailbox.  This is a bad regressions.

The fetchmail configuration file says:

set daemon 900
set postmaster aoliva
set no bouncemail
defaults
   protocol imap
   auth ssh
   # mda "/usr/bin/procmail -d aoliva"
   to aoliva
   expunge 0
poll oliva@lsd
   via emilia.lsd.ic.unicamp.br.
   plugin "ssh -x -a -l oliva emilia bin/imapd"

imapd on the remote end is imap-2001a-18 (from Shrike).

I'll attach the contents of the remote mailbox after that fetchmail session was
completed, with the not-flushed message by itself.

Version-Release number of selected component (if applicable):
fetchmail-6.2.0-8

How reproducible:
Always

Steps to Reproduce:
1.store the attached e-mail in your /var/spool/mail/box
2.set up fetchmail to do imap over ssh from there
3.run it


Actual Results:  the message isn't fetched.

Expected Results:  it should.  the previous release did.  fetchmail-6.2.0-3,
that I still have handy, does as well.

Additional info:
Comment 1 Alexandre Oliva 2003-10-21 23:28:24 EDT
Created attachment 95376 [details]
the mailbox that triggers the bug
Comment 2 Fabrice Bellet 2003-11-13 12:14:49 EST
I have the same problem. This is related to the patch
fetchmail-6.2.0-reply_hack.patch. In my case the message is silently
flushed from the server despite the error. The problem is that linelen
is modified by reply_hack(), but its value is used elsewhere to
decrement a char counter in the mainloop. Does this patch work for you ?

--- transact.c	2003-11-13 18:09:39.000000000 +0100
+++ transact.c.new	2003-11-13 18:05:11.000000000 +0100
@@ -415,7 +415,7 @@
     skipcount = 0;
     ctl->mimemsg = 0;
 
-    for (remaining = fetchlen; remaining > 0 || protocol->delimited;
remaining -= linelen)
+    for (remaining = fetchlen; remaining > 0 || protocol->delimited; )
     {
 	char *line;
 	int overlong = FALSE;
@@ -433,6 +433,7 @@
 		return(PS_SOCKET);
 	    }
 	    set_timeout(0);
+	    remaining -= n;
 	    linelen += n;
 	    msgblk.msglen += n;
 
Comment 3 Alexandre Oliva 2003-11-19 21:21:46 EST
Thanks, I can confirm that the patch fixes the problem, apparently
without introducing any ill effects.
Comment 4 Fabrice Bellet 2003-12-11 10:21:46 EST
Maybe an updated package could be released for Fedora Core 1 (as this
bug also applies to FC1) ?
Comment 5 Alexandre Oliva 2004-02-13 10:04:32 EST
Any reason why this patch didn't make it even to FC2test1?
Comment 6 Alexandre Oliva 2004-02-24 08:40:14 EST
Patch still applies cleanly atop of 6.2.0-10, and avoids the
unfetchable-message problem we've had since 6.2.0-8.  Could you please
oh please merge the patch in?  I've rolled my own RPMS to fix the
issue, and I could provide diffs to spec files if you'd like.
Comment 7 Simon Perreault 2004-04-03 08:52:57 EST
Created attachment 99088 [details]
Proposed patch
Comment 8 Simon Perreault 2004-04-03 08:55:35 EST
Created attachment 99089 [details]
Proposed spec patch

Now you don't have any excuse not to close this bug. ;)
Comment 9 Simon Perreault 2004-04-03 08:57:56 EST
In the meantime, for those interested, you can find the RPM at
http://nomis80.org/rpms/fetchmail-6.2.0-8.1.i386.rpm.

Note You need to log in before you can comment on or make changes to this bug.