[jira] [Closed] (JAMES-4092) Mailrepository: filter content

"Benoit Tellier (Jira)" <[email protected]>
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/JAMES-4092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier closed JAMES-4092.
---------------------------------
    Resolution: Fixed

Implemented, and no further work planned on the topic

> Mailrepository: filter content
> ------------------------------
>
>                 Key: JAMES-4092
>                 URL: https://issues.apache.org/jira/browse/JAMES-4092
>             Project: James Server
>          Issue Type: New Feature
>          Components: MailStore &amp; MailRepository, webadmin
>            Reporter: Benoit Tellier
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> h2. Why?
> Today I was on call with a customer. They screwed up a redirection rule that eventually got replicated to James, which dropped / rejected legitimate email fluxes.
> The intent was to audit content of address-error mail repository, to see if some relavant content was there.
> This was surpisingly complicated to acheieve. Repository adopt thoussands of mails, and I lacked filtering hability to expore this well.
> h2. Use cases
> As an administrator I want:
>  - To list emails in a repository in a given time period
>  - To list emails in a repository in matching sender pattern
>  - To list emails in a repository in matching recipient pattern
>  - From a specific address / host
> By applying also to deletions and reprocessing we could do fun things like:
>  - Reprocess overquota mails daily over a week
>  - But drop them after two week
> h2. Api changes
> Add url parameters for the filters. They can be combined (logical AND):
> {code:java}
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?updatedBefore=2d
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?updatedAfter=2d
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?sender=.%2A%40domain.com // curl encoded: >*@domain.com
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?recipient=.%2A%40domain.com // url encoded: >*@domain.com
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?remoteAddress=128.45.67.89
> curl -XGET /mailRepositories/var%2Fmail%2Ferror%2F/mails?remoteHost=mx.domain.tld
> {code}
> Apply it also for DELETE:
> {code:java}
> curl -XDELETE /mailRepositories/var%2Fmail%2Ferror%2F/mails?remoteHost=mx.domain.tld
> {code}
> And for Reprocess All (PATCH):
> {code:java}
> curl -XPATCH 127.0.0.1:8000/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&remoteHost=mx.domain.tld
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.