You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we've been using Post Office for a while now. For some of the emails we send, we need to implement a retention policy, so that we don't collect addresses of customers for longer than it is needed.
Is there a recommended way to implement this with the current codebase?
Some thoughts we had on how to implement this:
Filtering on Log entries, and deleting sent emails based on our retention policy. However, we need to tell apart the emails for which the retention policy applies from those that it doesn't.
Setting a header for these emails would help to tell types of emails apart. However, Email.headers field is not indexed, so filtering on the field would be O(N). Also,
Setting both the header and the retention period in Email.headers. Again, the field will need to be indexed.
Adding an indexed Email.retain_until DateTime field or Email.retain_for DurationField field and a manager method to support the functionality. These fields could be set when sending the email, and used by a periodic job to implement the retention policy. However, this requires changes to the Email model (i.e. forking the project and/or making a PR to upstream). If this sounds like a useful addition that would be accepted, we're willing to put the work needed for it.
Any thoughts on how we should proceed or other approaches that we haven't considered are welcome.
The text was updated successfully, but these errors were encountered:
Hi, I think some kind of retention policies would be a great addition. For starters, I like the idea of adding retain_untilDateField. Would accept a PR for this.
Hello, we've been using Post Office for a while now. For some of the emails we send, we need to implement a retention policy, so that we don't collect addresses of customers for longer than it is needed.
Is there a recommended way to implement this with the current codebase?
Some thoughts we had on how to implement this:
Any thoughts on how we should proceed or other approaches that we haven't considered are welcome.
The text was updated successfully, but these errors were encountered: