Hi Paul,
first things first: thanks for your swift and helpful response!
Well I am not that skilled with triggers either and of course
I would like to have a solution that works on every backend,
though MySQL is most important for me at them moment.
But what do you mean by "manually setup querries"? You
hacked the dbmail source code in a way so it does an extra
query on a message insertion?
greetings,
Daniel
Am 03.09.2008 um 14:36 schrieb Paul J Stevens:
Daniel Urstöger wrote:
Hi there,
I have one more question:
the webmail system I wrote is almost done but at the moment I have
something that is not really working as I would like it too:
checking for
new messages. I do that by polling the database for it, but I suppose
you guys have a nice way to fix that via a trigger within the mysql
db?
Not. I also use polling for the IDLE feature. The way I've solved
that in the 2.3 tree is by adding a datetime field called 'mtime' on
dbmail_mailboxes.
First off, I tried using triggers to update that field whenever a
record in dbmail_messages was changed, but this created trigger-
storms that were unacceptable. So now I'm using manually setup
queries to update it whenever a message is inserted or a (set of)
message(s) is/are updated.
This makes checking for mailbox changes cheap as hell.
Like having a table called: new_mail and update/insert entries there
based on a MySQL trigger? I have no idea where and how I could
put that into the current db scheme of dbmail without breaking/
generating other problems ...
Using triggers is possible, but like I described, you would have to
make pretty damn sure you test for update storms that may bring your
database to its knees. And I'm not well-versed enough in trigger
semantics to conceive a sensible setup that will work for all
supported backends.
--
________________________________________________________________
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
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail