You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Glennos <gl...@gmail.com> on 2022/03/23 02:22:07 UTC

Send emails using Apache James

Hi all,

    I'm wondering if there's an established way to send emails using Apache
James? I've scanned through the codebase and I haven't found anything and
I'm wondering if I've missed it.

    I was expecting to find something that;

   1. Looked up the MX address for each destination address
   2. Attempted to send the email to one of these MX addresses on ports
   587, 465, 25, 2525
   3. Possibly signed the email using the DKIM private key before sending.

    However I was unable to find anything resembling any of that?

    Any help or suggestions would be appreciated! I'm attempting to avoid
using something like Amazon SES or similar with all of their pricing
structures and such.

Thanks in advance,

Glennos

Re: Send emails using Apache James

Posted by Benoit TELLIER <bt...@linagora.com>.
As far as I know the branch you are speacking of is merged.

Regards

On 23/03/2022 14:20, Glennos wrote:
> Hi Benoit - created https://github.com/apache/james-project/pull/929 - but
> can't set better base unless you push
> https://github.com/chibenwa/james-project/tree/netty4-combo branch to
> https://github.com/apache/james-project
>
>
>
> On Wed, 23 Mar 2022 at 18:06, Benoit TELLIER <bt...@linagora.com> wrote:
>
>> Hello,
>>
>> On 23/03/2022 13:54, Glennos wrote:
>>> Hi Benoit,
>>>
>>>       If you're able to approach the maintainers of HubSpot/NioSmtpClient
>>> that'd be great! They have some contact details here which might be
>>> helpful: https://www.hubspot.com/company/contact . I'm also happy to
>> donate
>>> some time to upgrade to Netty 4/etc.
>> This makes sense, and I would be happy to do so, if we reach a consensus
>> around here that "writing a NIO based SMTP transport" is a good mid-term
>> objective.
>>
>> We also need to have people willing to put such an effort together.
>> Thanks for proposing yourself!
>>
>> On the short term, a NioSmtpClient fork could be the way to go, to add
>> potentially missing features and dependency updates. We can open issues
>> there regarding Netty/James updates.
>>
>> On the middle term, once these updates are complete on NioSmtpClient (or
>> even before!) we could write James extensions (mailets) using
>> NioSmtpClient. A gatewaying mailet is IMO a great candidate. A
>> substitute to RemoteDelivery might be harder. At this point we could
>> consider importing/forking NioSmtpClient in the james eco-system.
>>>       Thanks for the info on RemoteDelivery! How'd you go with reviewing
>>> https://github.com/glennosss/james-project/commits/netty4-combo ?
>> You did open a PR against my private repository, by principle this is
>> problematic as Apache fellows will not see this.
>>
>> I encourage you re-opening the PR against
>> https://github.com/apache/james-project.
>>
>> Regards,
>>
>> Benoit
>>> Regards,
>>>
>>> Glennos
>>>
>>>
>>> On Wed, 23 Mar 2022 at 17:33, Benoit TELLIER <bt...@linagora.com>
>> wrote:
>>>> Hello,
>>>>
>>>> Yes, I did come accross this project, it would be nice to integrate it
>>>> for a NIO based replacement of remote delivery.
>>>>
>>>> I did not yet approached maintainers to suggest such a code donation to
>>>> the ASF but IMO this would make great sens!
>>>>
>>>> https://issues.apache.org/jira/browse/JAMES-964 is the JIRA ticket
>>>> referencing this.
>>>>
>>>> Regards,
>>>>
>>>> Benoit
>>>>
>>>> On 23/03/2022 10:17, Glennos wrote:
>>>>> The closest I've been able to find is:
>>>>> https://github.com/HubSpot/NioSmtpClient (based off Apache James
>>>>> 3.3.1.Final and Netty 3)
>>>>>        Example use:
>>>>>
>> https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java
>>>>> This implementation is based on 'netty-codec-smtp'. You can see latest
>>>>> version of this codec here:
>>>>> https://github.com/netty/netty/tree/4.1/codec-smtp
>>>>>
>>>>> Interestingly when Apache James releases Netty 4, this project can be
>>>>> updated fairly easily to Netty 4 as well!
>>>>>
>>>>> Perhaps this project should be brought into Apache James? They do say
>>>> their
>>>>> license is Apache 2.0 - but they haven't been keeping up with new
>>>> releases
>>>>> of Apache James - so it might make sense to bring in.
>>>>>
>>>>>
>>>>> On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>>        I'm wondering if there's an established way to send emails using
>>>>>> Apache James? I've scanned through the codebase and I haven't found
>>>>>> anything and I'm wondering if I've missed it.
>>>>>>
>>>>>>        I was expecting to find something that;
>>>>>>
>>>>>>       1. Looked up the MX address for each destination address
>>>>>>       2. Attempted to send the email to one of these MX addresses on
>> ports
>>>>>>       587, 465, 25, 2525
>>>>>>       3. Possibly signed the email using the DKIM private key before
>>>> sending.
>>>>>>        However I was unable to find anything resembling any of that?
>>>>>>
>>>>>>        Any help or suggestions would be appreciated! I'm attempting to
>>>> avoid
>>>>>> using something like Amazon SES or similar with all of their pricing
>>>>>> structures and such.
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Glennos
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>

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


Re: Send emails using Apache James

Posted by Glennos <gl...@gmail.com>.
Hi Benoit - created https://github.com/apache/james-project/pull/929 - but
can't set better base unless you push
https://github.com/chibenwa/james-project/tree/netty4-combo branch to
https://github.com/apache/james-project



On Wed, 23 Mar 2022 at 18:06, Benoit TELLIER <bt...@linagora.com> wrote:

> Hello,
>
> On 23/03/2022 13:54, Glennos wrote:
> > Hi Benoit,
> >
> >      If you're able to approach the maintainers of HubSpot/NioSmtpClient
> > that'd be great! They have some contact details here which might be
> > helpful: https://www.hubspot.com/company/contact . I'm also happy to
> donate
> > some time to upgrade to Netty 4/etc.
> This makes sense, and I would be happy to do so, if we reach a consensus
> around here that "writing a NIO based SMTP transport" is a good mid-term
> objective.
>
> We also need to have people willing to put such an effort together.
> Thanks for proposing yourself!
>
> On the short term, a NioSmtpClient fork could be the way to go, to add
> potentially missing features and dependency updates. We can open issues
> there regarding Netty/James updates.
>
> On the middle term, once these updates are complete on NioSmtpClient (or
> even before!) we could write James extensions (mailets) using
> NioSmtpClient. A gatewaying mailet is IMO a great candidate. A
> substitute to RemoteDelivery might be harder. At this point we could
> consider importing/forking NioSmtpClient in the james eco-system.
> >      Thanks for the info on RemoteDelivery! How'd you go with reviewing
> > https://github.com/glennosss/james-project/commits/netty4-combo ?
> You did open a PR against my private repository, by principle this is
> problematic as Apache fellows will not see this.
>
> I encourage you re-opening the PR against
> https://github.com/apache/james-project.
>
> Regards,
>
> Benoit
> >
> > Regards,
> >
> > Glennos
> >
> >
> > On Wed, 23 Mar 2022 at 17:33, Benoit TELLIER <bt...@linagora.com>
> wrote:
> >
> >> Hello,
> >>
> >> Yes, I did come accross this project, it would be nice to integrate it
> >> for a NIO based replacement of remote delivery.
> >>
> >> I did not yet approached maintainers to suggest such a code donation to
> >> the ASF but IMO this would make great sens!
> >>
> >> https://issues.apache.org/jira/browse/JAMES-964 is the JIRA ticket
> >> referencing this.
> >>
> >> Regards,
> >>
> >> Benoit
> >>
> >> On 23/03/2022 10:17, Glennos wrote:
> >>> The closest I've been able to find is:
> >>> https://github.com/HubSpot/NioSmtpClient (based off Apache James
> >>> 3.3.1.Final and Netty 3)
> >>>       Example use:
> >>>
> >>
> https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java
> >>> This implementation is based on 'netty-codec-smtp'. You can see latest
> >>> version of this codec here:
> >>> https://github.com/netty/netty/tree/4.1/codec-smtp
> >>>
> >>> Interestingly when Apache James releases Netty 4, this project can be
> >>> updated fairly easily to Netty 4 as well!
> >>>
> >>> Perhaps this project should be brought into Apache James? They do say
> >> their
> >>> license is Apache 2.0 - but they haven't been keeping up with new
> >> releases
> >>> of Apache James - so it might make sense to bring in.
> >>>
> >>>
> >>> On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:
> >>>
> >>>> Hi all,
> >>>>
> >>>>       I'm wondering if there's an established way to send emails using
> >>>> Apache James? I've scanned through the codebase and I haven't found
> >>>> anything and I'm wondering if I've missed it.
> >>>>
> >>>>       I was expecting to find something that;
> >>>>
> >>>>      1. Looked up the MX address for each destination address
> >>>>      2. Attempted to send the email to one of these MX addresses on
> ports
> >>>>      587, 465, 25, 2525
> >>>>      3. Possibly signed the email using the DKIM private key before
> >> sending.
> >>>>       However I was unable to find anything resembling any of that?
> >>>>
> >>>>       Any help or suggestions would be appreciated! I'm attempting to
> >> avoid
> >>>> using something like Amazon SES or similar with all of their pricing
> >>>> structures and such.
> >>>>
> >>>> Thanks in advance,
> >>>>
> >>>> Glennos
> >>>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-dev-help@james.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

Re: Send emails using Apache James

Posted by Benoit TELLIER <bt...@linagora.com>.
Hello,

On 23/03/2022 13:54, Glennos wrote:
> Hi Benoit,
>
>      If you're able to approach the maintainers of HubSpot/NioSmtpClient
> that'd be great! They have some contact details here which might be
> helpful: https://www.hubspot.com/company/contact . I'm also happy to donate
> some time to upgrade to Netty 4/etc.
This makes sense, and I would be happy to do so, if we reach a consensus 
around here that "writing a NIO based SMTP transport" is a good mid-term 
objective.

We also need to have people willing to put such an effort together. 
Thanks for proposing yourself!

On the short term, a NioSmtpClient fork could be the way to go, to add 
potentially missing features and dependency updates. We can open issues 
there regarding Netty/James updates.

On the middle term, once these updates are complete on NioSmtpClient (or 
even before!) we could write James extensions (mailets) using 
NioSmtpClient. A gatewaying mailet is IMO a great candidate. A 
substitute to RemoteDelivery might be harder. At this point we could 
consider importing/forking NioSmtpClient in the james eco-system.
>      Thanks for the info on RemoteDelivery! How'd you go with reviewing
> https://github.com/glennosss/james-project/commits/netty4-combo ?
You did open a PR against my private repository, by principle this is 
problematic as Apache fellows will not see this.

I encourage you re-opening the PR against 
https://github.com/apache/james-project.

Regards,

Benoit
>
> Regards,
>
> Glennos
>
>
> On Wed, 23 Mar 2022 at 17:33, Benoit TELLIER <bt...@linagora.com> wrote:
>
>> Hello,
>>
>> Yes, I did come accross this project, it would be nice to integrate it
>> for a NIO based replacement of remote delivery.
>>
>> I did not yet approached maintainers to suggest such a code donation to
>> the ASF but IMO this would make great sens!
>>
>> https://issues.apache.org/jira/browse/JAMES-964 is the JIRA ticket
>> referencing this.
>>
>> Regards,
>>
>> Benoit
>>
>> On 23/03/2022 10:17, Glennos wrote:
>>> The closest I've been able to find is:
>>> https://github.com/HubSpot/NioSmtpClient (based off Apache James
>>> 3.3.1.Final and Netty 3)
>>>       Example use:
>>>
>> https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java
>>> This implementation is based on 'netty-codec-smtp'. You can see latest
>>> version of this codec here:
>>> https://github.com/netty/netty/tree/4.1/codec-smtp
>>>
>>> Interestingly when Apache James releases Netty 4, this project can be
>>> updated fairly easily to Netty 4 as well!
>>>
>>> Perhaps this project should be brought into Apache James? They do say
>> their
>>> license is Apache 2.0 - but they haven't been keeping up with new
>> releases
>>> of Apache James - so it might make sense to bring in.
>>>
>>>
>>> On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>>       I'm wondering if there's an established way to send emails using
>>>> Apache James? I've scanned through the codebase and I haven't found
>>>> anything and I'm wondering if I've missed it.
>>>>
>>>>       I was expecting to find something that;
>>>>
>>>>      1. Looked up the MX address for each destination address
>>>>      2. Attempted to send the email to one of these MX addresses on ports
>>>>      587, 465, 25, 2525
>>>>      3. Possibly signed the email using the DKIM private key before
>> sending.
>>>>       However I was unable to find anything resembling any of that?
>>>>
>>>>       Any help or suggestions would be appreciated! I'm attempting to
>> avoid
>>>> using something like Amazon SES or similar with all of their pricing
>>>> structures and such.
>>>>
>>>> Thanks in advance,
>>>>
>>>> Glennos
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>

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


Re: Send emails using Apache James

Posted by Glennos <gl...@gmail.com>.
Hi Benoit,

    If you're able to approach the maintainers of HubSpot/NioSmtpClient
that'd be great! They have some contact details here which might be
helpful: https://www.hubspot.com/company/contact . I'm also happy to donate
some time to upgrade to Netty 4/etc.

    Thanks for the info on RemoteDelivery! How'd you go with reviewing
https://github.com/glennosss/james-project/commits/netty4-combo ?

Regards,

Glennos


On Wed, 23 Mar 2022 at 17:33, Benoit TELLIER <bt...@linagora.com> wrote:

> Hello,
>
> Yes, I did come accross this project, it would be nice to integrate it
> for a NIO based replacement of remote delivery.
>
> I did not yet approached maintainers to suggest such a code donation to
> the ASF but IMO this would make great sens!
>
> https://issues.apache.org/jira/browse/JAMES-964 is the JIRA ticket
> referencing this.
>
> Regards,
>
> Benoit
>
> On 23/03/2022 10:17, Glennos wrote:
> > The closest I've been able to find is:
> > https://github.com/HubSpot/NioSmtpClient (based off Apache James
> > 3.3.1.Final and Netty 3)
> >      Example use:
> >
> https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java
> >
> > This implementation is based on 'netty-codec-smtp'. You can see latest
> > version of this codec here:
> > https://github.com/netty/netty/tree/4.1/codec-smtp
> >
> > Interestingly when Apache James releases Netty 4, this project can be
> > updated fairly easily to Netty 4 as well!
> >
> > Perhaps this project should be brought into Apache James? They do say
> their
> > license is Apache 2.0 - but they haven't been keeping up with new
> releases
> > of Apache James - so it might make sense to bring in.
> >
> >
> > On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:
> >
> >> Hi all,
> >>
> >>      I'm wondering if there's an established way to send emails using
> >> Apache James? I've scanned through the codebase and I haven't found
> >> anything and I'm wondering if I've missed it.
> >>
> >>      I was expecting to find something that;
> >>
> >>     1. Looked up the MX address for each destination address
> >>     2. Attempted to send the email to one of these MX addresses on ports
> >>     587, 465, 25, 2525
> >>     3. Possibly signed the email using the DKIM private key before
> sending.
> >>
> >>      However I was unable to find anything resembling any of that?
> >>
> >>      Any help or suggestions would be appreciated! I'm attempting to
> avoid
> >> using something like Amazon SES or similar with all of their pricing
> >> structures and such.
> >>
> >> Thanks in advance,
> >>
> >> Glennos
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

Re: Send emails using Apache James

Posted by Benoit TELLIER <bt...@linagora.com>.
Hello,

Yes, I did come accross this project, it would be nice to integrate it 
for a NIO based replacement of remote delivery.

I did not yet approached maintainers to suggest such a code donation to 
the ASF but IMO this would make great sens!

https://issues.apache.org/jira/browse/JAMES-964 is the JIRA ticket 
referencing this.

Regards,

Benoit

On 23/03/2022 10:17, Glennos wrote:
> The closest I've been able to find is:
> https://github.com/HubSpot/NioSmtpClient (based off Apache James
> 3.3.1.Final and Netty 3)
>      Example use:
> https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java
>
> This implementation is based on 'netty-codec-smtp'. You can see latest
> version of this codec here:
> https://github.com/netty/netty/tree/4.1/codec-smtp
>
> Interestingly when Apache James releases Netty 4, this project can be
> updated fairly easily to Netty 4 as well!
>
> Perhaps this project should be brought into Apache James? They do say their
> license is Apache 2.0 - but they haven't been keeping up with new releases
> of Apache James - so it might make sense to bring in.
>
>
> On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:
>
>> Hi all,
>>
>>      I'm wondering if there's an established way to send emails using
>> Apache James? I've scanned through the codebase and I haven't found
>> anything and I'm wondering if I've missed it.
>>
>>      I was expecting to find something that;
>>
>>     1. Looked up the MX address for each destination address
>>     2. Attempted to send the email to one of these MX addresses on ports
>>     587, 465, 25, 2525
>>     3. Possibly signed the email using the DKIM private key before sending.
>>
>>      However I was unable to find anything resembling any of that?
>>
>>      Any help or suggestions would be appreciated! I'm attempting to avoid
>> using something like Amazon SES or similar with all of their pricing
>> structures and such.
>>
>> Thanks in advance,
>>
>> Glennos
>>

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


Re: Send emails using Apache James

Posted by Glennos <gl...@gmail.com>.
The closest I've been able to find is:
https://github.com/HubSpot/NioSmtpClient (based off Apache James
3.3.1.Final and Netty 3)
    Example use:
https://github.com/HubSpot/NioSmtpClient/blob/master/src/test/java/com/hubspot/smtp/IntegrationTest.java

This implementation is based on 'netty-codec-smtp'. You can see latest
version of this codec here:
https://github.com/netty/netty/tree/4.1/codec-smtp

Interestingly when Apache James releases Netty 4, this project can be
updated fairly easily to Netty 4 as well!

Perhaps this project should be brought into Apache James? They do say their
license is Apache 2.0 - but they haven't been keeping up with new releases
of Apache James - so it might make sense to bring in.


On Wed, 23 Mar 2022 at 13:22, Glennos <gl...@gmail.com> wrote:

> Hi all,
>
>     I'm wondering if there's an established way to send emails using
> Apache James? I've scanned through the codebase and I haven't found
> anything and I'm wondering if I've missed it.
>
>     I was expecting to find something that;
>
>    1. Looked up the MX address for each destination address
>    2. Attempted to send the email to one of these MX addresses on ports
>    587, 465, 25, 2525
>    3. Possibly signed the email using the DKIM private key before sending.
>
>     However I was unable to find anything resembling any of that?
>
>     Any help or suggestions would be appreciated! I'm attempting to avoid
> using something like Amazon SES or similar with all of their pricing
> structures and such.
>
> Thanks in advance,
>
> Glennos
>

Re: Send emails using Apache James

Posted by Benoit TELLIER <bt...@linagora.com>.
Hi Glennoss

Answers inlined.

Benoit

On 23/03/2022 09:22, Glennos wrote:
> Hi all,
>
>      I'm wondering if there's an established way to send emails using Apache
> James? I've scanned through the codebase and I haven't found anything and
> I'm wondering if I've missed it.
You are looking for RemoteDelivery mailet ;-)
>
>      I was expecting to find something that;
>
>     1. Looked up the MX address for each destination address
>     2. Attempted to send the email to one of these MX addresses on ports
>     587, 465, 25, 2525
Precisely what remote delivery does.
>     3. Possibly signed the email using the DKIM private key before sending.
server/mailet/dkim contains what you are looking for.
>
>      However I was unable to find anything resembling any of that?
>
>      Any help or suggestions would be appreciated! I'm attempting to avoid
> using something like Amazon SES or similar with all of their pricing
> structures and such.
>
> Thanks in advance,
>
> Glennos
>

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