james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tellier Benoit (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-2279) Write a WithPriority mailet and HasPriority matchers
Date Fri, 05 Jan 2018 12:07:00 GMT
Tellier Benoit created JAMES-2279:
-------------------------------------

             Summary: Write a WithPriority mailet and HasPriority matchers
                 Key: JAMES-2279
                 URL: https://issues.apache.org/jira/browse/JAMES-2279
             Project: James Server
          Issue Type: New Feature
          Components: Mailet Contributions
    Affects Versions: master
            Reporter: Tellier Benoit


James mail queues is handling mail priorities. See the *MailPrioritySupport* interface.

This is done using the MAIL_PRIORITY mail attribute. It is an integer property ranging from
0 (low) to 9 (high) and mail queue component will default to 5.

Today, the mail processing unit akka mailetContainer can not change the priority set by the
SMTP layer (using *MailPriorityHandler*). This is a problem as we can not re-prioritise outgoing
emails, for instance in remote delivery queues.

I would thus propose the following mailet:

{code:xml}
<mailet matcher="All" class="WithPriority">
    <value>8</value>
</mailet>
{code}

Furthermore, we might want to customize processing logic depending on the priority (might
it just be for debugging purpose).

To do so, I propose to introduce the following matchers:

{code:xml}
<mailet matcher="HasPriority=8" class="Any"/>
<mailet matcher="AtLeastPriority=8" class="Any"/>
<mailet matcher="AtMostPriority=8" class="Any"/>
{code}

*How to do this?*

In the `server/mailet/mailets` project, in the mailet package create the WithPriority mailet
which sets the MAIL_PRIORITY attribute. 

Create the matchers in  `server/mailet/mailets` in the matcher package.

Write unit tests for these mailets / matchers.

Use MailetUtil content to parse the integer conditions/value.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message