Daniel Urstöger wrote:

> yes, I will have to update my script accordingly, it just gives me
> quite an advantage accessing the data directly via SQL and not havening
> IMAP as intermediate layer, performance wise.

Misconception. IMAP performance is just fine. But many imap clients do not
leverage it properly. But the choice is yours of course.

And: there is still plenty room for improving dbmail's imap performance, I know.

>> That's correct. Forwarded is not a supported flag (yet).
> 
> Okay, so how does a mail client recognize this? via an IMAP command to?

yep: the PERMANENTFLAGS line of the SELECT response.


>> For now:  use IMAP's "FETCH n (BODYSTRUCTURE)"
> 
> hmm, (without looking in the source code of dbmail) what does happen
> here? The whole message is opened by the IMAP daemon, the structure is
> extracted from the message and then returned? if so, I could do that in
> a PHP subroutine too and maybe cut the system resources a bit ...

Yeah, right :-) but you need a very good mime parsing library.

> well Paul, here we are: basically my script does two things: first it
> generates a list of all messages in the inbox and shows one of them
> accordingly to users settings ( just like the overview in Outlook /
> Thunderbird). So, the overview list is basically the dbmail_messages
> table with a few joins ( like subject, etc.) so far and showing the
> selected messages it has to deal with mime already.

A typical IMAP call to retrieve such information would be

x UID FETCH 1:* (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc
Subject Date Content-Type)])

which indeed maps to just the kind of joining query you currently use. The
content-type header will generally tell you whether or not you need to display
an attachment icon. Retrieving the full bodystructure info is most likely only
needed to generate the message view-pane, not for the list pane.

> BUT if for the overview I have to open EVERY email completly and look
> around for mime stuff that will significantly drop performance. Atm the
> script is able to handle 2000 emails in the inbox within 2 seconds of
> page load time and I like that to keep this that way. If not possible I
> would have to cache information but mainly I have performance in mind.

Really, if you write a webmail client that needs to retrieve the body structure
of 2000 message at once, go back to the drawing board. Email clients that dont
want to build a big offline cache don't need that much info.

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to