I've added to the ORDER BY clause of the query in question. See if your messages appear in a more consistent order now. I think it is a good idea to return the messages in their id number order for consistency.
On Tue, 2006-09-12 at 08:39 -0600, Jesse Norell wrote: > That's most likely the order in which the database returns the > message id's .. eg. see what something like "select message_idnr > from dbmail_messages where mailbox_idnr = xxxx" returns, it's > probably the order you're seeing. You can turn logging up to level > 5 to see the exact queries being run. As Mark pointed out, I > don't think they're required to be in any order, and as such they > likely aren't sorted (which would slightly improve performance), > though doing so would be easy. > > > > On Mon, Sep 11, 2006 at 03:42:56PM -0700, Aaron Stone wrote: > >> On Mon, 2006-09-11 at 18:17 -0400, [EMAIL PROTECTED] wrote: > >> > Using dbmail-pop3d, I've been having problems where email shows up > >> > out-of-sequence. I.e. I send an email with subject 1, wait for it to > >> > enter dbamil via LMTP; send an email with subject 2, and wait again; > >> > send an email with subject 3, and wait again; and then connect via > >> > POP3. The order for the three emails is not always consistent. > >> > > >> > Anyone seen this? > >> > >> Sure, it's just a matter of how/when the MTA does its delivery. > >> Transferring mail is certainly not a deterministic process ;-) > > > > It's not the MTA. I'm watching the logs, and only sending one email > > at a time. I'm waiting for each message to get completely through the > > system before sending the next one, i.e. messages like so: > > > > dbmail/lmtpd[24920]: sort.c, sort_and_deliver: message id=405091, size=854 > > is inserted > > > > I test POP3 by manually telneting to localhost 110 and using user, > > pass, list, retr, and dele commands. Starting with an empty mailbox > > and sending a few emails in relatively rapid sequence, my emails are > > showing up in reverse order -- first the most recent, then the next > > older, etc. If I don't delete messages after I read them, then the > > messages from the prior session are showing up first and then the new > > ones, again with the older messages first within each group. If I > > wait awhile, they show up in a different order, sometimes sorted as I > > would expect them. What's happening is confusing. > > > > - Morty > > > >