Without seeing exactly what POP3/IMAP4 commands you (or your 'looped query')
are issuing, I cannot say exactly what you are doing and if that is
'correct'. But I can see a way to duplicate what you see, using telnet and
POP3.
If one connects to a user account, then issue a DELE 1 command, then try a
RETR 1 command, the system will say 'no such message' and if you disconnect
correctly (issue a QUIT command), then the next access to that mailbox will
show X-1 messages (as it is supposed to do and with the 2nd message becoming
#1!). However, if one disconnects incorrectly (just aborting the connection)
IMail will see that as a bad POP3 session and will _not_ perform the 'DELE
1' operation, restoring the mailbox to the state it was in before that
connection (again, as it should do to an improperly terminated session).
If you connected with another POP3 session, while the above connection was
extablished (and after the DELE command issued), that 2nd connection could
see that there are X messages (using STAT) in the mailbox, but the DELEted
one cannot be read with 'RETR #', as IMail has marked it for deletion, but
not yet performed that operation, as the first connection (that issued the
command!) is still open. Again, this is how it should work.
The only 'problem' I see with this is that IMail allows the second
connection (that could be a 'feature' depending on your perspective), so one
could connect and see the mailbox in the transition state, rather than in a
normal state, before all operations in the first session are completed.
So, I suspect you are not disconnecting correctly or connecting multiple
times to the mailbox, with your 'looped query' and 'causing' the problem.
Note that this could also happen if another access method (IMAP4, Web MSG)
were connected to that user account and similiar operations performed, at
the same time.
I even found that if the first connection were broken (not terminated
correctly, so 'DELE 1' is not performed), the second can now see the
'deleted' message, ('RETR 1' now returns the complete message) even though
it could not, prior to this.
So the mailbox is not really corrupt, just in a state of flux at the time
you see the 'no such message' error message. If your 'looped query' connects
but never disconnects before the loop starts again, you could easily have
more than one connection open to the mailbox and think you see it as
'corrupted'. Maybe you need to put a 'disconnect and wait a short while' in
the loop to give IMail the opportunity to close the mailbox and complete the
DELE 1 (and any other operations).
Also, if you used a 'DELE 2' command, instead of 'DELE 1', you probably
would find that you never have problems with message 1.
Daniel Donnelly
________________________________________________________
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 29, 2000 8:57 PM
Subject: [IMail Forum] missing "message #1"!
>
> I just sent this email to Ipswitch technical support - but was wondering
if
> anyone else out there might also have an idea on how to deal with this:
>
> Dear Ipswitch / Imail Support:
>
> The mailbox corrupts constantly, where that there is "no mail message
number
> 1" - though there is 2, 3, etc.
>
> The email that "isn't there" is still visible - and can be read - through
> the Imail Client on the server. Deleting it (the message that isn't there)
> from the client will free the mailbox again, but the system corrupts in a
> matter of minutes.
>
> I'm running a looped query against the mailbox that request the first
> message and then deletes it from the mailbox. Though not "fast" - doing
this
> to 35 messages takes a few minutes (I manipulate the data and save it into
a
> database before deleting) - the Mailbox corrupts somewhere through the
loop
> almost 85% of the time.
>
> Manually deleting a .uid file will not work as this is supposed to be an
> automated process, and to be done on 100's of email accounts.
>
> Can you please indicate a solution, or, wrap-around to the problem of the
> "does not exist - message number 1" that is occurring?
>
> Thank you for your time,
> Stephen R. Cassady
> [EMAIL PROTECTED]
>
>
>
>
> Please visit http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
> An Archive of this list is available at:
> http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
>
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/