# Retention and deleting log entries

Source: https://catalystgroup.gg/docs/email-delivery/log-retention-and-deleting/
Updated: 2026-10-19 · By Duane Garner

Control how long the email log keeps entries, how the daily cleanup works, and how to delete one, several or all entries yourself.

The email log should not grow forever. This article explains the **Retention** setting, the automatic daily cleanup, and the three ways to delete entries by hand. It is for administrators who manage disk space, privacy requests or data-keeping rules.

 

## Set the retention period

 

Go to **CRM-NG SMTP → Settings → Email Log**. In the settings at the top, enter a number in **Retention** and press **Save Local Logging Settings**.

 
- The value is in **days**.
- The lowest value is 1, the highest is 365.
- The default is 30.

 

### Choosing a value

 

| Your situation | Suggested retention |
| --- | --- |
| You store email bodies, which may hold reset links and personal data | 7 to 14 days |
| You only log basic details and want to spot problems | 30 days |
| You need a longer audit trail | 90 to 365 days, or export regularly |

 

Shorter is better for privacy. Longer is better for spotting slow patterns, such as a customer who says they have never received anything.

 

## How the daily cleanup works

 

Once a day, CRM-NG SMTP deletes every log entry older than your retention period. For each removed entry it also deletes:

 
- its stored body and headers,
- its stored attachment files,
- its open and click tracking records.

 

The cleanup runs on WordPress's scheduled tasks (WP-Cron). WP-Cron runs when someone visits your site. On a very quiet site, or one where WP-Cron is turned off without a server cron job, the cleanup may run late. See [Action Scheduler issues](https://catalystgroup.gg/docs/email-delivery/action-scheduler-issues/) for how to set up a reliable cron.

 

> **Changing the value:** If you lower the retention, older entries are removed at the next daily run, not straight away. If you raise it, entries already deleted do not come back.

 

The cleanup runs even when logging is turned off, so old entries still age out.

 

## Delete one entry

 
1. Open the entry
  On the **Email Log** tab, click the subject of the email.
2. Delete it
  Press **Delete log** and confirm.

 

## Delete several entries

 
1. Tick the entries
  Use the boxes at the left of each row. The box in the header row ticks every row on the current page.
2. Delete them
  Press **Delete selected** under the list and confirm.

 

Only the rows you ticked on the current page are deleted. Use the status menu and search box first to bring the right rows together. See [Searching and filtering the email log](https://catalystgroup.gg/docs/email-delivery/search-and-filter-the-log/).

 

## Delete everything

 

At the bottom of the log list is **Erase all local email data**. It permanently removes every log entry, every stored attachment and every tracking event. You are asked to confirm. Your settings are kept.

 

> **This cannot be undone:** There is no recycle bin. If you might need the records later, use **Export CSV** first. See [Exporting the email log](https://catalystgroup.gg/docs/email-delivery/export-the-log/).

 

## Privacy requests

 

If someone asks you to delete their data, search for their address, tick the matching rows and press **Delete selected**. Repeat for each page of results. Remember that other plugins, your mail service and the recipient's mailbox may hold their own copies.

 

## When you uninstall

 

If **Uninstall CRM-NG SMTP** is turned on in the **Misc** tab, deleting the plugin also removes its database tables, including the email log. If it is off, the log stays in your database after the plugin is deleted. See [Miscellaneous settings](https://catalystgroup.gg/docs/email-delivery/misc-settings/).

 

## Related

 
- [Setting up the email log](https://catalystgroup.gg/docs/email-delivery/email-log-setup/)
- [Viewing the email log](https://catalystgroup.gg/docs/email-delivery/viewing-the-email-log/)
- [Exporting the email log](https://catalystgroup.gg/docs/email-delivery/export-the-log/)
- [What the plugin stores and sends](https://catalystgroup.gg/docs/email-delivery/privacy-and-data/)
- [Miscellaneous settings](https://catalystgroup.gg/docs/email-delivery/misc-settings/)
