IMAP configuration in gitlab self managed

Hope i find you well

Problem to solve

I’m trying to configure IMAP on gitlab, for gitlab service desk. When i try to test IMAP setting’s i get: (Try fixing it:
An error occurred: Net::IMAP::Error: connection closed
Check that the information in config/gitlab.yml is correct
For more information see:
Please fix the error above and rerun the checks.)

Steps to reproduce

Configure IMAP in gitlab.rb with office365 server




I would be glad if someone help, from what I read IMAP is not used now but, i don’t know what i can use instead of IMAP.


You would probably need to check to see if IMAP is enabled in your Office 365 settings, as it could be disabled by default. Another issue now is, that Microsoft do not allow username/password authentication now and force people to use OAUTH2 or GraphAPI instead. So it may also be that IMAP is enabled on port 993, but username/password auth is no longer possible.

Microsoft did allow for people to re-enable it in their Office 365 settings, but I believe now it’s not even possible to do that.

More info here: Incoming email | GitLab there is a section on Microsoft GraphAPI that you may wish to use instead.

1 Like

Can you help me configuring the Microsoft graph API?

I’m new in this area.

Thank you


You have all the info here: Incoming email | GitLab

See the “MailRoom step-by-step guide”. I don’t use O365 or GraphAPI, but there’s plenty of info from those links, or even what can be found by searching using google.

The main incoming email link at the beginning of this message has all you need to do to configure Gitlab with GraphAPI once you’ve configured it on the Microsoft side using the step-by-step guide previously mentioned.

So i have a self managed gitlab, what i see is that a self managed gitlab can’t have Microsoft Graph api

And i reached the part that i changed the gitlab.rb to the microsoft graph

After this im a litle lost.

Thank you

If you install a deb or rpm package, then you do not have a self-compiled installation. Compiling means building from source, so unless you did this, it’s not relevant.

Configuring gitlab.rb is in the docs I already sent you: Incoming email | GitLab

Read it.

Hello, i have done all the configuration in microsoft azure.

I’m a little lost in the git hub that you sent (GitHub - tpitale/mail_room: Forward mail from gmail IMAP to a callback URL or job worker, simply.) about the delivery_method.

I don’t know if this means something (Portainer Log’s):

If you could help it would be gratfull.

Thank you.