Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 14:05:20 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Stephen McKay <smckay@internode.on.net>
Cc:        freebsd-bugs@freebsd.org
Subject:   Re: fetchmail-6.2.5 bug in FreeBSD-current
Message-ID:  <20040328110520.GA93846@gothmog.gr>
In-Reply-To: <200403281007.i2SA7LJ7016369@dungeon.home>
References:  <200403261523.i2QFNhGS044804@gothmog.gr> <20040327040256.GA95621@xor.obsecurity.org> <20040327054536.GA68587@gothmog.gr> <200403281007.i2SA7LJ7016369@dungeon.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-03-28 20:07, Stephen McKay <smckay@internode.on.net> wrote:
> On Saturday, 27th March 2004, Giorgos Keramidas wrote:
> >Looking more carefully at the check, I found out that you're absolutely
> >right.  The check's logic is fine as it is, it's the way that the
> >pop3_getpartialsizes() function is called that is broken.
>
> When I ran into this problem, I found a patch that is supposed to do
> the right thing (ie not try to fetch multiple sizes when that isn't
> possible).  I'm pretty sure I found it in the fetchmail list archives.
> [...] But I didn't bother to try the patch since adding
> "fetchsizelimit 1" to .fetchmailrc is a successful workaround.

Oh well, that was *so* very on the spot.  I searched for the patch and
found a siggestion for fetchsizelimit = 1, along with a note that POP3
works fine -- it's only APOP and RPOP that are broken (I should have
guessed after looking at the code of fetchmail/driver.c, but somehow
I failed to remember that I'm using APOP).

The solution suggested by Sunil Shetye who wrote the nearby parts of
driver.c was to set fetchsizelimit to 1 OR change driver.c to make sure
that fetchsizelimit is automagically set to 1 for APOP and RPOP too.

The following little diff fixed things for me, without having to make
any changes to existing config files of my accounts or the accounts of
other people:

%%
--- driver.c.orig	Sun Mar 28 13:29:15 2004
+++ driver.c	Sun Mar 28 13:49:42 2004
@@ -429,7 +429,8 @@
 	/* for POP3, we can get the size of one mail only! Unfortunately, this
 	 * protocol specific test cannot be done elsewhere as the protocol
 	 * could be "auto". */
-	if (ctl->server.protocol == P_POP3)
+	if (ctl->server.protocol == P_POP3 || ctl->server.protocol == P_APOP ||
+	    ctl->server.protocol == P_RPOP)
 	    fetchsizelimit = 1;
 
 	/* Time to allocate memory to store the sizes */
%%

Many thanks for pointing me to the right direction :-)

- Giorgos



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