On a side note, is there a reason that mailboxes are physically deleted
from the DB? Surely taking a similar approach to mailboxes as is taken
for messages would be better? I.e., when a mailbox is deleted, it is
marked as deleted along with all messages in it, and it is only
destroyed when a purge is done. Is there a reason that approach was not
taken?

Legacy. Dbmail was originally developed as a pop3 server where users
have only 1 mailbox. What you propose is perfectly valid and already on
the TODO list.
Is there an easy way for me to implement this? We really do need
a comprehensive perpetual record of messages.
The simplest way would be:
- drop the foreign key restraints between dbmail_messages and
dbmail_mailboxes.
- setup a trigger that will update the status field of messages when a
mailbox is deleted.

doing it like that won't even require code changes, just schema changes.

But another approach (more flexible) would be to re-assign a deleted
mailbox to an internal system user like '__archive__' so you can allow
administrators access to deleted mailboxes in a dedicated namespace like
'#Archive'. If a user would delete a mailbox, or if you delete a
complete account, the 'deleted' mailboxes would become visible under:

'#Archive/someusername/some/deleted/mailbox/name'

I've been thinking this over. I don't think I'm going to go the route of making my own modifications to make this happen, as when it does get implemented properly, I would then have to either migrate my existing data or maintain repositories in both systems. Given that there is no urgency for us to get this working in the immediate future, I think I will opt to wait for the DBMail team to implement mailbox retention.

Is there any way I could get an indication of when this would be implemented? Is it going to be in 2.4.x or is it on the "to-do at some indefinite point in the future" timeframe? Were I a C coder I would definitely help out, but I'm a rank newbie who can only do PHP so I regret that I am only able to watch and wait.

Thanks,
- Naz
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to