CREATE RULE drop_physmessages_with_messages AS ON DELETE TO
dbmail_messages DO DELETE FROM dbmail_physmessage WHERE id =
OLD.physmessage_id;

That seems to help. I've created a new user, uploaded 100MB of e-mail, 
then just deleted it. And there are no dead physmessages around:

DELETE FROM dbmail_physmessage WHERE id NOT IN (SELECT physmessage_id 
FROM dbmail_messages);
DELETE 0

Should I file it as a bug report? It's more like a feature.

mfg zmi
-- 
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0676/846 914 666                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: EA39 8918 EDFF 0A68 ACFB  11B7 BA2D 060F 1C6F E6B0
// Keyserver: www.keyserver.net                   Key-ID: 1C6FE6B0

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
DBmail mailing list
DBmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to