Maillog log table size escalation

Created on 27 June 2012, about 12 years ago
Updated 23 March 2024, 3 months ago

The maillog table seems to fill up quite quickly, especially on sites with large numbers of mail messages being sent. Two problems seem to arise:

  • Lots of table entries that never get trimmed;
  • With HTML mails, storing the body can a significant amount of data per row, and with lots of rows this can mount up to very large table footprints.

So, I've made a couple of additions to the module:

  • Added two fields to the Maillog settings form to:
    • Choose whether to store the full body or a short body (trimmed to 512chars)
    • Select a time duration to store Maillog log entries;
  • Store either the full or short mail body according to the option selected in the admin form;
  • Added a cron job that clears out entries older than the age set in the admin form;

Patch attached. Helping us to keep our Maillog log under control, at least!

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom joe-b

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024