Re: [Dbmail-dev] broken auth/authldap.c

2004-06-01 Thread Ilja Booij
Aaron Stone wrote: Fixed in CVS. Thanks for the heads up! I must have scared Ilja away with my GETCONFIGVALUE macro ;-) :) Thanks for noticing (Paul) and fixing (Aaron) Ilja

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Ilja Booij
Thomas Mueller wrote: Hi Ilja, Aha, it wasn't as simple as I thought... The 'if' isn't right, because strcasecmp only looks at the first 5 characters, and you just gave the perfect example why this does not work. What we can do is the following: keep the 'if' as it is. Convert the first 5

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Thomas Mueller
Hi Ilja, > >strncasecmp() tests if the folder begins with INBOX and thats always > >true - right? So we have to use strcasecmp(name, "INBOX") right? > >Confused ... > > Aha, it wasn't as simple as I thought... The 'if' isn't right, because > strcasecmp only looks at the first 5 characters, and y

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Ilja Booij
Thomas Mueller wrote: Hi Ilja, Isn't the simplest solution this: change the query for the special case of 'INBOX' to: SELECT mailbox_idnr FROM mailboxes WHERE name = 'INBOX' and owner_idnr = '%llu'; We always store 'INBOX' as 'INBOX' (all caps), so, this will always work. And we have no

Re: [Dbmail-dev] Re: [Dbmail] internal_delivery_user and curmail_size bottleneck...

2004-06-01 Thread Thomas Mueller
Hi Aaron, > > > We have two classes of programs: > > > - lmtpd, smtpd, pop3d: before we do anything with a message BEGIN, if we > > > return SUCCESS to the client COMMIT, else ROLLBACK - should be quite > > > easy? > > > - imapd: for every IMAP operation: > > > - if it's a read only one leav

Re: [Dbmail-dev] Re: [Dbmail] internal_delivery_user and curmail_size bottleneck...

2004-06-01 Thread Ilja Booij
Aaron Stone wrote: A failed delivery response from the LMTP or SMTP processes doesn't necessarily mean that nothing was inserted or updated in the database. Only a hard database error / inconsistency should generate a rollback; for all other cases, I would suggest simply commit it, even if nothin

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Thomas Mueller
Hi Ilja, > Isn't the simplest solution this: > > change the query for the special case of 'INBOX' to: > > SELECT mailbox_idnr FROM mailboxes WHERE name = 'INBOX' and owner_idnr = > '%llu'; > > We always store 'INBOX' as 'INBOX' (all caps), so, this will always > work. And we have no problem w

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Ilja Booij
Aaron Stone wrote: Ilja Booij <[EMAIL PROTECTED]> said: [snip] change the query for the special case of 'INBOX' to: SELECT mailbox_idnr FROM mailboxes WHERE name = 'INBOX' and owner_idnr = '%llu'; We always store 'INBOX' as 'INBOX' (all caps), so, this will always work. And we have no pro

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Aaron Stone
Ilja Booij <[EMAIL PROTECTED]> said: [snip] > > change the query for the special case of 'INBOX' to: > > SELECT mailbox_idnr FROM mailboxes WHERE name = 'INBOX' and owner_idnr = > '%llu'; > > We always store 'INBOX' as 'INBOX' (all caps), so, this will always > work. And we have no problem wi

Re: [Dbmail-dev] Missing postgres index

2004-06-01 Thread Ilja Booij
Aaron Stone wrote: So people looking for their INBOX end up forcing a full table scan to find out when lower( name ) = lower( 'INBOX' ), when in fact 99% of the time, the value of column name => "INBOX" anyways. Changing the query from lower( '%s' ) to lower( 'inbox' ) is basically a micro-optim

Re: [Dbmail-dev] Re: [Dbmail] internal_delivery_user and curmail_size bottleneck...

2004-06-01 Thread Aaron Stone
Ilja Booij <[EMAIL PROTECTED]> said: > Thomas Mueller wrote: > > Hi Ilja, > > > > [.. transactions ..] > > > It's really a matter of design, and not just something we can slap on > DBMail. We *should* think hard about how to do this in the best way > possible, but we *must* eventua

[Dbmail-dev] Re: [Dbmail] internal_delivery_user and curmail_size bottleneck...

2004-06-01 Thread Ilja Booij
Thomas Mueller wrote: Hi Ilja, [.. transactions ..] It's really a matter of design, and not just something we can slap on DBMail. We *should* think hard about how to do this in the best way possible, but we *must* eventually move to a system that uses the database features in a better way.