Hello Mark, MMO> We do something similar - 24 hour grace period. I'd like to make MMO> it 7 days for any message from deletion, not just say every 7 MMO> days. With the size of our database, I need to run the purge MMO> every day unfortunately - so the deleted timestamp would be more MMO> helpful. It would also allow us to differentiate services - so MMO> say corporate customers had a 30 day grace period but standard MMO> mailboxes had a 48 hour one.
Simple enough; Modify your message table to include a timestamp field. This is automatically updated each time the record is updated. Use the current dbmail-maint program to handle actual deletions. However, replace the "tag for deletion" phase with a script invoking some modified queries. The query for flipping the flag from 002 to 003 can take the age of the timestamp into account, so you can set an X-day limbo with daily purges. If you're using client IDs to differentiate domains, a join can give you the client ID associated with a particular message, and you can write more complex JOINed queries to associate a 002 message with a particular domain, to decide what interval to apply. -- Best regards, Jeff mailto:[EMAIL PROTECTED]
