Closed alexkved closed 3 months ago
Thanks for your suggestion @alexkved, this makes sense to me. I do not have an ETA as I'm working on another big task right now, but I'll add this to my "TODO" list :+1:
Thank you for considering this feature request. We appreciate your time and effort in reviewing it, and we look forward to any updates you might have on this in the future.
This feature has been released in v1.20.0. Please see the release notes and linked documentation, and let me know if this works for you? Thanks.
@axllent , thank you very much for your effort. It works like a charme.
That's great to hear, thanks for the feedback!
Description Currently, Mailpit allows users to limit the maximum number of email messages stored using the
MP_MAX_MESSAGES
option. However, some users would prefer to control the retention of messages based on their age. For example, automatically deleting messages older than a specified number of hours or days.Proposed Solution Introduce a new option
MP_MAX_MESSAGE_AGE
that specifies the maximum age of messages to be retained in Mailpit. Messages older than this age should be automatically deleted.Option:
MP_MAX_MESSAGE_AGE
: Specifies the maximum age of messages in hours or days. For example, 72h to retain messages for 72 hours or 3d for 3 days.Benefits
Example Usage: