Hi Abid,

I'm not too involved in DSpace or Tomcat, but I have done a lot of work with 
SMTP and XOAUTH2.

It looks like JavaMail has support for OAuth2 out of the box from 1.5.5 onwards 
https://javaee.github.io/javamail/OAuth2 and it looks like DSpace can use 
JavaMail via JNDI so that could be an interesting path to explore.

Otherwise, using Postfix is a good option as well. Since Postfix uses SASL you 
can use all kinds of plugins. The two best known ones are probably 
https://github.com/tarickb/sasl-xoauth2 and 
https://github.com/moriyoshi/cyrus-sasl-xoauth2/ although I don't think they 
support the client credentials grant. If you're more adventurous you can use my 
own https://github.com/minusdavid/simple-sasl-xoauth2 which is a very simple 
SASL plugin that just formats the SMTP AUTH payload for XOAUTH2 and relies on a 
separate service to provide the token (which is what provides the client 
credentials grant support).

If you use Postfix, I'd recommend you look at 
https://www.postfix.org/SASL_README.html especially "Configuring 
Sender-Dependent SASL authentication" and 
https://www.postfix.org/postconf.5.html#smtp_sasl_password_maps. This allows 
you to support many different email addresses with many different 
authentication providers, credentials, etc. 

>From memory, DSpace isn't a super email heavy app, so you're probably best off 
>just going the Postfix route. 

But I imagine there are other people more intimately familiar with DSpace who 
can better answer your question. 

David Cook
Lead Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of 
AFA
Sent: Wednesday, 4 November 2026 7:10 PM
To: DSpace Technical Support <[email protected]>
Subject: [dspace-tech] Setting up SMTP in DSpace 10 with Microsoft 365 as App 
Passwords phase out

Hi everyone,

With Microsoft actively phasing out Basic Authentication and App Passwords for 
SMTP, we are looking for advice on how other institutions are configuring their 
outbound email workflows in DSpace.

We are currently running DSpace 10 for our university's Question Bank 
repository, which is mapped to the URL here: https://qbank.jgu.edu.in/home. Our 
campus relies entirely on Microsoft 365 / Entra ID infrastructure.

Since DSpace’s local.cfg natively utilizes standard JavaMail—which expects a 
traditional static username and password pair—continuing to rely on App 
Passwords is no longer a viable long-term strategy for us. We want to make sure 
our automated system notifications remain reliable as Microsoft's newer 
security enforcement takes full effect.

Could anyone share how your institution is tackling this transition? We are 
specifically curious about a few paths:

1. What is the community-recommended way to configure SMTP in DSpace 10 when 
integrated with Microsoft 365, bypassing legacy App Passwords?
2. Has anyone successfully integrated Modern Auth (OAuth 2.0) directly within 
DSpace’s mail settings, or is the standard best practice to implement a 
server-level workaround (like setting up a local mail forwarder/proxy like 
Postfix on the host machine to handle token lifecycles)?
3. Are there any hidden JavaMail configuration properties in local.cfg or 
external middleware setups that have proven exceptionally stable for your 
environment?

Any guidance, architectural best practices, or snippets of a working mail setup 
from your production environments would be incredibly helpful to us.

Thanks in advance for your insights!

Best regards,
Abid Fakhre Alam
O.P. Jindal Global University 

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://lyrasis.org/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/c542ea61-f201-4ced-a41e-ac7d773b44cfn%40googlegroups.com
 
<https://groups.google.com/d/msgid/dspace-tech/c542ea61-f201-4ced-a41e-ac7d773b44cfn%40googlegroups.com?utm_medium=email&utm_source=footer>
 .


-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://lyrasis.org/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/12bd01dd6cc4%24684735b0%2438d5a110%24%40prosentient.com.au.

Reply via email to