Michael Monnerie wrote: > CREATE RULE drop_physmessages_with_messages AS ON DELETE TO > dbmail_messages DO DELETE FROM dbmail_physmessage WHERE id = > OLD.physmessage_id;
Like I said: don't do that. Try the trigger/rule I posted. It is totally valid to have physmessages that are used by several messages in different mailboxes owned by different users. > > 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. There is already a bug for this. 'integrety checks incomplete' or something like that. _______________________________________________ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail