Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a WithPriority mailet #1

Open
chibenwa opened this issue Jul 19, 2018 · 0 comments
Open

Write a WithPriority mailet #1

chibenwa opened this issue Jul 19, 2018 · 0 comments
Labels

Comments

@chibenwa
Copy link
Contributor

chibenwa commented Jul 19, 2018

James relies on a plugin defined mail processing system. Units of this mail processing system aremailets and matcher.

A matcher represents a condition that an incoming email can satisfy. A mailet represent a treatment of an incoming email (modification of the mail and/or side effect).

James like other mail systems relies on a MailQueue in order to asynchronously process emails independently of SMTP sessions that had been generating them. The MailQueue supports priority. A priority is an integer ranging from 0 (LOW_PRIORITY) to 9 (HIGH_PRIORITY).

The priority of an email is held under the "MAIL_PRIORITY" mail attribute.

Your task is to create a WithPriority mailet in server/mailet/mailets in the mailets package.

To do so:

  • Add the mailQueue API dependency in the pom.xml of that project.
  • Create a WithPriority mailet in the relevant package. It should extend GenericMailet.

This mailet should take a priority configuration parameter being an integer ranging from 0 to 9 (included). Upon all other values, or if missing, an exception should be thrown.

Here is an example for it's possible configuration:

<mailet matcher="All" class="WithPriority">
    <priority>8</priority>
</mailet>
  • You will write unit tests for this mailet.

You will open a pull request on https://github.com/linagora/james-project .

See https://issues.apache.org/jira/browse/JAMES-2279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant