Share

The Fetchmail Project

Tracker: Bugs

5 Failure to delete certain emails from pop server - ID: 780933
Last Update: Comment added ( m-a )

I am running Gentoo Linux and upgraded fetchmail last
weekend to version 6.2.3. It passes mail off to
procmail version 3.22-r6.

Nothing has changed in my mail configuration. It polls
a pop3 server at 30 second intervals via a cable modem
and downloads everything locally. Here is my .fetchmailrc

# Configuration created Fri May 24 08:02:19 2002 by
fetchmailconf
set postmaster "jcunningham"
set bouncemail
set no spambounce
set properties ""
poll <my.isp> with proto POP3
user 'jeffrey' there with password '<password>'
is 'jeffrey' here
options fetchall stripcr warnings 3600 mda
'/usr/bin/procmail -f -'

For years this has worked just fine. After the upgrade
a particular email (spam) "stuck" on the pop3 server
and would not be deleted after it was read by
fetchmail. So, every polling interval fetchmail treats
it like a new email, causing it to multiply downstream.
24x120 copies of this email a day.

The problem email has an invalid header - it has no
date and no message ID. Before the upgrade, fetchmail
could handle these - I've seen them before. Now, it
appears, it cannot.

Here is the full header of one of these emails (from
downstream, after it has been tagged by bogofilter as
spam):

Return-Path: <adlung7@hotmail.com>
Delivered-To:
cunningham.net%jeffrey@cunningham.net Received: from
mail.cunningham.net.criticalpath.net
[209.231.81.83] by localhost
with POP3 (fetchmail-6.2.3) for jeffrey@localhost
(single-drop);
Wed, 30 Jul 2003 07:58:43 -0700 (PDT) Received:
(cpmta 10901 invoked
from network); 21 Jul 2003 22:51:37 -0700
Received: from
81.248.149.186 (HELO
ALagny-110-1-7-186.w81-248.abo.wanadoo.fr) by
smtp.c000.snv.cp.net (209.228.33.183) with SMTP;
21 Jul 2003
22:51:37 -0700 X-Received: 22 Jul 2003 05:51:37
GMT From: "Rupert"
<adlung7@hotmail.com>
To: <jeffrey@cunningham.net>
Subject: thank-you
Content-Type: text/html;
charset="windows-1251"
X-Bogosity: Yes, tests=bogofilter,
spamicity=0.999647,
version=0.13.7.2

If I move this email (via webmail interface) to some
other directory on my pop3 server than the inbox, it
fixes the problem - normal email and normal spam is
handled as before. If I move it back to the inbox it
breaks it again. I have about four of these types of
"fetchmail-breaker" emails in a problem directory that
I test with.

Here is a section of the log showing one repetition:

Jul 31 08:24:23 [fetchmail] 1 message for jeffrey at
getmail.cunningham.net (3321 octets).
Jul 31 08:24:23 [fetchmail] reading message
jeffrey@mail.cunningham.net.criticalpath.net:1 of 1
(3321 octets)
Jul 31 08:24:23 [fetchmail] incorrect header line found
while scanning headers
Jul 31 08:24:23 [fetchmail] message delimiter found
while scanning headers
Jul 31 08:24:23 [bogofilter] X-Bogosity: Yes,
spamicity=0.999747, version=0.13.7.2, register-s, 40
words, 1 messages
Jul 31 08:24:23 [fetchmail] flushed
Jul 31 08:24:23 [fetchmail] client/server protocol
error while fetching from getmail.cunningham.net
Jul 31 08:24:23 [fetchmail] Query status=4 (PROTOCOL)
Jul 31 08:24:23 [fetchmail] sleeping at Thu, 31 Jul
2003 08:24:23 -0700 (PDT)
Jul 31 08:25:23 [fetchmail] awakened at Thu, 31 Jul
2003 08:25:23 -0700 (PDT)
Jul 31 08:25:27 [fetchmail] 1 message for jeffrey at
getmail.cunningham.net (3321 octets).
Jul 31 08:25:27 [fetchmail] reading message
jeffrey@mail.cunningham.net.criticalpath.net:1 of 1
(3321 octets)
Jul 31 08:25:27 [fetchmail] incorrect header line found
while scanning headers
Jul 31 08:25:27 [fetchmail] message delimiter found
while scanning headers
Jul 31 08:25:27 [bogofilter] X-Bogosity: Yes,
spamicity=0.999778, version=0.13.7.2, register-s, 40
words, 1 messages
Jul 31 08:25:27 [fetchmail] flushed

In case you think it is relevant, here is my
.procmailrc file:

VERBOSE=on
SHELL=/bin/sh
LINEBUF=4096
PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
MAILDIR=${HOME}/Mail
LOCKEXT=.lock
DEFAULT=${MAILDIR}/inbox
LOGFILE=${HOME}/procmail.log
ADMINFOLDER=${MAILDIR}/admin
BULKFOLDER=${MAILDIR}/bulk
FORMAIL=/usr/bin/formail
SENDMAIL=/usr/sbin/sendmail
## First run stuff through bogofilter
:0fw
| bogofilter -u -e -p -l
## If bogofilter fails, throw the mail back into
the pipe ## e=only
execute if preceeding recipe executed and failed
:0e
{ EXITCODE=75 HOST }
## if its spam, put it in the caught folder
:0:.caught-bogo
* ^X-Bogosity: Yes
| rcvstore +spam/caught-bogo
## If it passed, try it through spamassassin.
:0 fw
* < 256000
| /usr/bin/spamassassin
## Mails with a score of 15 or higher are almost
certainly spam
(with 0.05% ## false positives according to
rules/STATISTICS.txt).
Let's put them in a ## different mbox. (This one
is optional.)
:0:.caught-sa
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
| rcvstore +spam/caught-sa
## All mail tagged as spam (eg. with a score
higher than the set
threshold) ## is moved to "probably-spam".
:0:.caught-sa-maybe
* ^X-Spam-Status: Yes
| rcvstore +spam/caught-sa-maybe
###
## Accept all the rest to default mailbox
:0:.inbox
| rcvstore +inbox

If there is anything else I can give you to help solve
this, let me know.

-Jeff Cunningham
jeffrey@cunningham.net


Jeffrey Cunningham ( jkcunningham ) - 2003-07-31 15:53

5

Closed

Later

Nobody/Anonymous

None

None

Public


Comments ( 9 )

Date: 2006-05-14 22:56
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

I'm closing this bug for the nonce. If you can reproduce
the problem, either reopen this bug and add your new
information, or open a new one.

Thanks.


Date: 2006-04-09 22:24
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

Jeff,

the Resolution isn't much used for bugs that are still open,
but I don't mind the change.

Perhaps a change in the server software prevents this bug
from showing up, for instance, the software supporting LAST
or UIDL or enforcing Message-ID headers now when it didn't
at the time when you filed this report.

On the other hand, there are some bug fixes that were made
"before my time" in 6.2.4 and 6.2.5 which might somehow be
related, but I haven't yet taken the time to investigate
them, for instance in 6.2.5 "Dup-killer code now keys on an
MD5 hash of the raw headers." or in 6.2.4 "Sunil Shetye's
bug-fix rollup patch." and "Back out the hack to deal with
lack of byte stuffing on some POP3 servers." are candidates
- the latter appears to deal with escaping the "." lines and
is thus about dealing with corrupt messages.

I'm inclined to let this bug rest until it shows again, and
replace the insufficient Message-ID access by a hash over
the whole header in 6.4.0. I have added a pertinent node
referencing this bug ID to the TODO file in fetchmail's svn
trunk, http://mknod.org/svn/fetchmail/trunk/TODO for the
nonce (but to be merged with .../todo.html some day).

Rob and I only recently got access to the sourceforge
project, after we'd set up everything on developer.BerliOS.
de in the meanwhile, which explains the excessive delay
getting back to your bug.


Date: 2006-04-03 12:34
Sender: jkcunningham

Logged In: YES
user_id=550239

I forgot to change the status. Set it to 'later' - not sure
if that is correct.

--jeff


Date: 2006-04-03 12:31
Sender: jkcunningham

Logged In: YES
user_id=550239

Hi Mathias;

Thanks for looking into this. I've been keeping four such
emails on my email server ever since I had the trouble, but
now they are all gone (have no idea where they went). I
haven't had a recurrance since then, which either means I
have never received another such email, or the bug has been
incidentally fixed.

I've upgraded fetchmail several times. The current version
I'm running is 6.2.5.2-r1 - the latest available from Gentoo.

If the problem recurs, I will retrieve an email via telnet
and resubmit a bug with a -vvv log section.

Regards,
--jeff


Date: 2006-04-03 09:00
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

Could you get such a "poisonous message" manually (with
telnet and the RETR command) and also a fetchmail -vvv log
of the fetch attempt so we can see what fetchmail is sending?

Preferably of a later fetchmail version if possible.

Thank you.


Date: 2006-04-03 08:22
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

Forget my questions. Fetchmail 6.3.4-rc1 still looks at the
Message-ID only and breaks if the message has none.

Please try the uidl option as a workaround, I'm not sure if
this can actually be fixed in 6.3.X - it currently looks as
though the fix would have to wait until 6.4.0.




Date: 2006-04-03 08:04
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

Jeffrey,

could you please test:

1) if the problem is still there with fetchmail 6.3.4-rc1,
6.3.3 or 6.3.2? If it's still in 6.3.4-rc1, I do want to
know, so I can see if I can fix it before the final 6.3.4.

2) if the problem goes away if you add "UIDL" to the server
options.

I'm setting the bug to "Pending", which means it will
automatically be set to "Deleted" in 14 days' time.

Thank you.



Date: 2005-07-11 00:57
Sender: m-aProject AdminAccepting Donations

Logged In: YES
user_id=2788

Please test a more current fetchmail release, see
http://developer.berlios.de/projects/fetchmail - and if the
problem persists, re-file your bug there in the bug tracker.


Date: 2004-06-15 12:31
Sender: nobody

Logged In: NO

I have the same problem. This happens with some spams (I
dont have this problem with normal email).

I would like to have an option to delete this email if it has
invalid header. It would be enough for me.



Attached File

No Files Currently Attached

Changes ( 7 )

Field Old Value Date By
close_date - 2006-05-14 22:56 m-a
status_id Open 2006-05-14 22:56 m-a
resolution_id None 2006-04-03 12:34 jkcunningham
status_id Pending 2006-04-03 08:22 m-a
close_date 2006-04-03 08:04 2006-04-03 08:22 m-a
close_date - 2006-04-03 08:04 m-a
status_id Open 2006-04-03 08:04 m-a