You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Juhan Aasaru <ju...@apache.org> on 2020/09/25 14:11:31 UTC

Incoming messages via web service & using custom email headers

Hi!

We'll start to build a system for a government where each resident will
have a digital postbox and any government party can send messages and
documents to any of the residents securely. That means when email arrives
at the resident's mailbox the resident will get a notification to his main
email or cell phone and has to log in to webmail to see the whole message.

We find distributed Apache James to be a very good fit for our problem and
we plan to set it as the center of our system. So thank you everyone who
has contributed to the project. We also plan to contribute a lot to the
James project in upcoming months.

One of the first questions that we have is that the messages that travel
from some kind of internal document management system to the digital
postbox of the resident (via web services) - these messages are always not
exactly an email but also contain some additional fields that carry
information that will be later needed by mailets and UI that displays them
(we plan to use JMAP for displaying).

1.Would it be possible for messages to arrive into James via any other
means besides SMTP protocol (like a web service endpoint). If not then
would it be something that could be built by ourselves (and contributed
back)?

2. what would be the best way to add the additional fields into the email
so that they could be later read by UI and mailets that process them. We
were thinking about using custom header names like
"X-MySystemName-CategoryName". Do you see any downsides for that?

Thanks
Juhan Aasaru

Re: Incoming messages via web service & using custom email headers

Posted by Matthieu Baechler <ma...@apache.org>.
Hi Juhan,

That's an awesome project !

To answer your question: it would not be hard to provide a endpoint to
"send a mail" in a server-to-server context.

It's just a matter of writing an extension to the webadmin code (it's
basically where all REST APIs are located) that would retrieve the
MailQueue and call enqueue to it.

Feel free to ask for help if needed.

Cheers,

-- Matthieu Baechler

On Fri, 2020-09-25 at 17:11 +0300, Juhan Aasaru wrote:
> Hi!
> 
> We'll start to build a system for a government where each resident
> will
> have a digital postbox and any government party can send messages and
> documents to any of the residents securely. That means when email
> arrives
> at the resident's mailbox the resident will get a notification to his
> main
> email or cell phone and has to log in to webmail to see the whole
> message.
> 
> We find distributed Apache James to be a very good fit for our
> problem and
> we plan to set it as the center of our system. So thank you everyone
> who
> has contributed to the project. We also plan to contribute a lot to
> the
> James project in upcoming months.
> 
> One of the first questions that we have is that the messages that
> travel
> from some kind of internal document management system to the digital
> postbox of the resident (via web services) - these messages are
> always not
> exactly an email but also contain some additional fields that carry
> information that will be later needed by mailets and UI that displays
> them
> (we plan to use JMAP for displaying).
> 
> 1.Would it be possible for messages to arrive into James via any
> other
> means besides SMTP protocol (like a web service endpoint). If not
> then
> would it be something that could be built by ourselves (and
> contributed
> back)?
> 
> 2. what would be the best way to add the additional fields into the
> email
> so that they could be later read by UI and mailets that process them.
> We
> were thinking about using custom header names like
> "X-MySystemName-CategoryName". Do you see any downsides for that?
> 
> Thanks
> Juhan Aasaru


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


Re: Incoming messages via web service & using custom email headers

Posted by Tellier Benoit <bt...@apache.org>.
Hello Juhan,

Le 25/09/2020 à 21:11, Juhan Aasaru a écrit :
> Hi!
>
> We'll start to build a system for a government where each resident will
> have a digital postbox and any government party can send messages and
> documents to any of the residents securely. That means when email arrives
> at the resident's mailbox the resident will get a notification to his main
> email or cell phone and has to log in to webmail to see the whole message.
>
> We find distributed Apache James to be a very good fit for our problem and
> we plan to set it as the center of our system. So thank you everyone who
> has contributed to the project. We also plan to contribute a lot to the
> James project in upcoming months.

Wow that sounds like an incredibly good news! Welcome onboard!

I will do my best to answer your questions, as well as help you
contribute back.
> One of the first questions that we have is that the messages that travel
> from some kind of internal document management system to the digital
> postbox of the resident (via web services) - these messages are always not
> exactly an email but also contain some additional fields that carry
> information that will be later needed by mailets and UI that displays them
> (we plan to use JMAP for displaying).

Regarding JMAP, Linagora employed contributors are currently
implementing RFC-8621 (JMAP mail). Most of the work for reading mails is
already done regarding reading mail. Writing mails will come in the
coming months. In the meantime I would discourage using the Draft version.

> 1.Would it be possible for messages to arrive into James via any other
> means besides SMTP protocol (like a web service endpoint). If not then
> would it be something that could be built by ourselves (and contributed
> back)?
No such things exist yet but I believe it would be easy to add it as a
plugin, using for instance webadmin.
> 2. what would be the best way to add the additional fields into the email
> so that they could be later read by UI and mailets that process them. We
> were thinking about using custom header names like
> "X-MySystemName-CategoryName". Do you see any downsides for that?
No, we use it at Linagora to display "event" information that could be
contained in mails.

The downside is of course that the MUA needs to be performing the
display based on that header, this feature is only available in MUA
supporting it.
>
> Thanks
> Juhan Aasaru
>

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