You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-02-11 12:15:42

Kallisti
Member
Registered: 2017-07-28
Posts: 19

[HOW-TO] Office 365 SMTP configuration

How-to on how we implemented sending emails through Office 365

In Office 365

* We chose to use the SMTP relay function to allow emails to be sent from the GLPI installation without restrictions. For this you will need a static public IP for the GLPI installation.
* Create a mail flow connector in the Exchange admin center -> Mail flow -> Connectors. Create a new connector, name it and add the GLPI IP address - detailed instructions in the link above.

With your DNS provider - can be Microsoft

* Modify your SPF record to include the GLPI IP address - to avoid that the emails are marked as spam. Again detailed instructions in the link above.

In GLPI

This isn't difficult but it's where I struggled and why I want to share.
* Configure your notification settings (Setup->Notifications->enable followups and followups via mail -> Email followups configuration
* Way of sending email -> SMTP+TLS
* Check certificate -> Yes (I guess optional but should be good practice)
* SMTP host -> your tenant SMTP host, can be found in your MX record (details in link above), should look like //your tenant address with dot replaced with hypen + .mail.protection.outlook.com//
* Port -> 25
* SMTP login and SMTP password -> Empty <- this is what tripped me up, I created an account from which the emails should be sent but the SMTP relay function depends on the IP address, not the password
* Email sender -> here you put a valid email address in your tenant

Now you can save and send a test email to the administrator (the email in the top section)

Last edited by Kallisti (2021-02-11 12:16:25)

Offline

#2 2021-02-11 22:28:30

oj69
Member
From: Somewhere in the cloud
Registered: 2021-02-01
Posts: 157

Re: [HOW-TO] Office 365 SMTP configuration

Thanks for sharing with us. One Question: Don´t you have a local hybrid microsoft exchange server who can relay to Office365 ? It is included in your O365 license and makes everything much more easier.

Kind regards

Oliver

Offline

#3 2021-06-29 17:29:31

Kallisti
Member
Registered: 2017-07-28
Posts: 19

Re: [HOW-TO] Office 365 SMTP configuration

Hi Oliver!

I just wanted to avoid managing another server.

Offline

#4 2022-08-30 02:02:48

alrtpalmeiro
Member
Registered: 2020-01-09
Posts: 2

Re: [HOW-TO] Office 365 SMTP configuration

Hello,

I´m experiencing a similar scenario.
OAuth installed and working correctly in Mailgate.

I set the email and then the password in the credentials.

Tried with/without certificate verification but it still doesn't work.

I can send e-mails to external domains normally. I think something is wrong in authentication step (parameters maybe).


Method - SMTP+TLS
SMTP Server - smtp.office365.com
Port - 587

Method - SMTP+TLS
SMTP Server - domain.mail.protection.outlook.com
Port - 25


Any suggestion or log to check this situation?

Offline

#5 2022-09-21 12:51:22

brusilva
Member
Registered: 2020-11-17
Posts: 29

Re: [HOW-TO] Office 365 SMTP configuration

This SMTP Server - domain.mail.protection.outlook.com only allows sending email to internal emails (on the same tennant)

If you want to send outside you have to use smtp.office365.com

Offline

#6 2023-01-25 16:35:17

patrickg
Member
Registered: 2023-01-13
Posts: 2

Re: [HOW-TO] Office 365 SMTP configuration

how do i look at the debug log so i can understand why its not working?

Offline

#7 2023-11-07 17:13:18

alan_aguinaga
Member
Registered: 2022-01-17
Posts: 10

Re: [HOW-TO] Office 365 SMTP configuration

This is not working at all with office 365.

Home -> Configurar -> Destinatários
Nome   
glpi@myvalidemail
Ativo   
Sim
Servidor   
outlook.office365.com
Opções de conexão   
IMAP SSL NO-TLS
NO-VALIDATE-CERT
Pasta de e-mails recebidos (opcional, geralmente INBOX)   
Porta (opcional)   
Cadeia de conexão    {outlook.office365.com/imap/ssl/novalidate-cert/notls}
Usuário   
glpi@myvalidemail
Senha - same as Azure App


Home ->  Configurar ->  Notificações
Notificações por e-mail
Endereço de email do administrador   
glpi@myvalidemail
Nome do administrador   
glpi@myvalidemail
Endereço de remetente   
glpi@myvalidemail
Nome de remetente   
no-reply@csiway.com.br
Endereço Reply-To   
glpi@myvalidemail
Nome Reply-To   
Endereço Não responder   
glpi@myvalidemail
Nome do No-Reply   
Adicionar documentos às notificações de chamado   
Sim
Assinatura de e-mail   
Att,

Modo de envio de e-mails   
SMTP+TLS
Máx. de tentativas de entregas   
15
Tente entregar novamente em (minutos)   
5
Servidor de e-mail
Verificar certificado   
Não
Servidor do SMTP   
smtp.office365.com
Porta   
587
Login do SMTP (opcional)   
glpi@myvalidemail
Senha do SMTP (opcional) from Azure app

Offline

#8 2023-12-21 21:18:16

upulsudasinghe
Member
Registered: 2023-12-17
Posts: 1

Re: [HOW-TO] Office 365 SMTP configuration

Hi all,

I have done a fresh installation of "GLPI 10.0.11" version.
I also have enabled "Oauth IMAP 1.4.3" version

Registered the app in Azure and Oauth IMAP setup done using relevant Client, Tenant, secret IDs/Values. One authorization is also created successfully.

In "Authentication" section, I have done the "Mail Server" setup using Oauth IMAP application details. The test was successful using the authorised account in Oauth IMAP app.

One receiver was activated and tested using the authorised account in Oauth IMAP app, and that also was successful.

So now my problem is, only that authorised account in Oauth IMAP app can login using O365 login. Any other users in the same tenant can't log in. But If I added them into authorised account under oath IMAP app, those users can login. But it is not practical when you are having hundred users.

So, I guess that this could be an issue with my App permission in Azure. That's why I need your support to know what is the exact setup I should do in Azure to enable any of O365 users in my tenant to allow GLPI login using their O365 credentials.

My ultimate goal is to allow all O365 mail users in my tenant access GLP using their O365 creadentials.

It is much appreciated your support in this regard. Thanks in advance.

Last edited by upulsudasinghe (2023-12-22 06:22:55)

Offline

Board footer

Powered by FluxBB