Mail policies
A mail policy is a set of rules that mails should follow. A mail policy consists of:
- Mail policy id, used to uniquely identify the mail policy.
- Name, used as a user-friendly name.
- Priority, used to prioritize mails during dispatching, where '1' is highest priority
- Retention period, how long a mail is kept after it has been sent or failed permanently.
- Maximum number of attempts, the number of times the mail is attempted to be sent before it is marked as failed permanently.
- Mail cleanup action, used to indicate what should happen after a mail's retention period is over, which can be one of: 'None', 'Delete' or 'Archive'. Mail cleanup happens as a background job.
A mail policy must point to a mail provider, which you can read more about here.
Mail Cleanup Policy
Mails and their associated content has a retention policy which governs how long email content and metadata are retained.
Email Content Retention
- Deletion Timeline: Email message bodies are automatically deleted after 30 days.
- Attachments: Attachments associated with emails are deleted at the same time as the email content.
- After the retention period for email content expires, it will no longer be possible to view or resend the mail.
Metadata Retention
- Retention Period: Metadata, including sender, recipient, and timestamp information, is retained for a longer duration, allowing to reference the email history even after the content has been deleted. This data is kept up to a year after the mail has been enqueued.
- Metadata remains accessible for the defined retention period, enabling users to reference details about past emails.
Integration with Mail Policies
- Existing customer-configured mail policies (such as archiving or deletion settings) continue to function as expected.
- However, the retention policy overrides any configured settings, ensuring that email data is fully removed once the retention limits are reached.