[ 
https://issues.apache.org/jira/browse/JAMES-3758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528592#comment-17528592
 ] 

Karsten Otto commented on JAMES-3758:
-------------------------------------

A while back I experimented with "self-deleting mails". I did not think it 
would be of general interest, but maybe it would fit this feature ticket? My 
solution uses the "Expires" header, mostly known from HTTP but originally 
defined for email. It comes in two parts:
 # A mailet that adds an Expires header with a default period if the mail has 
none yet
 # A webadmin endpoint and task do delete all mails where the date from the 
Expires header is in the past

I believe you could use this for deleting all mails after a fixed period, maybe 
with a bit of tweaking. And it can be more flexible if mails actually included 
Expires headers already.

If you think this might help, I could polish it up and create a pull request. 
Just let me know.

 

> Endpoint to delete emails older than X days/months/years
> --------------------------------------------------------
>
>                 Key: JAMES-3758
>                 URL: https://issues.apache.org/jira/browse/JAMES-3758
>             Project: James Server
>          Issue Type: Improvement
>          Components: mailbox, webadmin
>    Affects Versions: 3.7.0
>            Reporter: Benoit Tellier
>            Priority: Major
>
> An often requested feature is to have a data cleaup mechanism to delete old 
> emails.
> We can easily implement such a task in webadmin-mailbox.
> For  instance: 
> {code:java}
> curl -XDELETE /messages?olderThan=1year
> {code}
> Would plan a task to delete emails older than a year accross all accounts. It 
> will return the count of deleted emails.
> As one of my customer is interested by this feature I might work on this.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to