|Subject:||IdPOP3Server losing messages :-(|
|Posted by:||Paul Kuczora (ne…@browserlock.com)|
|Date:||Thu, 11 Sep 2003|
Nightmare scenario time :-(
I've been using IdPOP3Server "welded" to a custom IdPOP3 derivative - when
mail is requested, the POP3 client is called within CheckUser, de-spams the
mail and downloads any valid messages to local storage.
This has been working fine for months.
Suddenly, messages aren't arriving at the final mail client reliably.
Usually it works fine, but sometime messages aren't being served - wierdest
thing is that sometimes *all* messages fail to arrive, sometimes only *some*
I've added a complete nested "rollback" feature by making duplicate copies
of all messages in local storage as they arrive, and always get a complete
set of messages so they are arriving on my machine OK.
Local storage is simple - message.1, message.2 and so on in a separate
folder for each mailbox. On STAT or LIST I just check for existence of
message.1 and so on until file not found. Messages are marked for deletion
by creating a file called message.del and adding in the message filename on
DELE. On QUIT any files listed in message.del are deleted, followed by the
.del file itself.
I can watch this all happening (files appearing and disappearing) as mail is
downloaded. Indy throws no exceptions, Eudora reports no errors, nor does
It just happened on my key mailbox with just 1 message in it - never arrived
in Eudora. The file message.1_ was there tho' (the backup copy). I rolled
that back (so it got renamed to message.1) and checked mail again - it
Worse thing is, I swear that I haven't changed that part of the code for
months, except in my attempts to fix things since the problem showed up :-(
I noticed that the app's log file had got to 12Mb, and it gets loaded and
saved back out on each mailcheck, so I thought that I'd found the problem,
but emptying that didn't fix things.
I'm off to drown my sorrows at a Polish wedding for a week,
FYI the app is currently single-threaded and uses AntiFreeze. I only ever
check one mailbox at a time.
BTW - how do you get IdLogFile to work? I dropped one on my main form, set
it to Active in the IDE and pointed the filename property to an empty text
file, but nothing shows up.