mailerpress/prune-email-logs deletes email send-log rows matched by age, status, service, campaign, recipient or subject pattern.
It exists because MailerPress provides no delete route and no retention policy for this table, so rows accumulate indefinitely.
Before you run it
This deletes log rows permanently, and the log is the only record of what was sent to whom and what the provider said about it. Run with dry_run: true first to see exactly what matches, then pass confirm_count equal to that number — the call aborts if the count has changed since, which catches a filter matching more than intended.
At a glance
| Ability | mailerpress/prune-email-logs |
| Toolset | MailerPress — toolset/mailerpress |
| Group | MailerPress › Campaigns & Sending |
| Requires | AcrossAI Pro, plus MailerPress active on the site |
| Capability | manage_options |
| Safety | Destructive — deletes log rows permanently. Requires a dry run first and confirm_count matching it exactly. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
On a site sending regularly that table becomes one of the largest in the database, and nothing in MailerPress offers to do anything about it.
The safety design is dry run plus exact count. The dry run reports what matches; the count confirms you looked at it; and the call aborts if the number has changed, which catches both a filter that matched more than expected and rows added since.
That abort is the useful half. A filter written slightly too broadly matches thousands more rows than intended, and the count makes that visible rather than discovered afterwards.
What is lost is real. The log answers “was this email sent, and what did the provider say” and nothing else does — so pruning by age is sensible and pruning by status to remove failures destroys the evidence of a delivery problem.
Prune old successes. Keep the errors.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
dry_run | boolean | No — run true first | Report what would be deleted without deleting it. |
confirm_count | integer | For the real run | Must equal the dry run’s count. Aborts if it has changed. |
older_than_days | integer | No | Match rows older than this. |
status | string | No | Match one status. |
service | string | No | Match one SMTP service. |
campaign_id | integer | No | Match one campaign. |
recipient | string | No | Match one recipient. |
subject_like | string | No | Match a subject pattern. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
matched | integer | How many rows match. |
deleted | integer | How many were removed, on a real run. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Clear out email logs older than a year.
It resolves to one call:
{
"ability": "mailerpress/prune-email-logs",
"parameters": {
"older_than_days": 365,
"dry_run": true
}
}Worth knowing
- MailerPress offers no retention policy, so this table grows forever.
- The count abort catches a filter that matched more than intended.
- Prune old successes; keep the errors, which are the evidence.
- Not idempotent.
Related abilities
- MailerPress Get Campaign Email Logs — what is being pruned
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category