Skip to content

Trouble with Authentication Method : CRAM-MD5

My mail server uses the autentication method CRAM-MD5

For some reason there is no authentication setting for IMAP in /etc/gitlab/gitlab.rb like it is for smtp in line 86 :

gitlab_rails['smtp_authentication'] = 'CRAM-MD5'

so I tried to add :

gitlab_rails['incoming_email_authentication'] = 'CRAM-MD5'

but I was not successfull ...

and after I run gitlab-ctl reconfigure

I couldn't see any settings according the authentication in /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml around the line 136 and below. Could this be the reason why I cannot log in ?

Some other strange thing is that in the smtp setting in /opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb (and I understand that this is generated from /etc/gitlab/gitlab.rb ) it says :

if Rails.env.production?
  smtp_settings = {
    authentication: :"CRAM-MD5",
                    ^--------------- Why is this ???

What's bothering me is this second ":" I don't know it it is a problem or not as the check aklready gives up at this moment of time, when I run:

gitlab-rake gitlab:incoming_email:check

IMAP server credentials are correct? ... Checking git@example.com
no
  Try fixing it:
  An error occurred: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
  Check that the information in config/gitlab.yml is correct
  For more information see:
  doc/administration/reply_by_email.md
  Please fix the error above and rerun the checks.
Init.d configured correctly? ... skipped
MailRoom running? ... skipped

Checking Reply by email ... Finished

Checking Incoming Email ... Finished

BTW : the email credentials I supplied are 100% correct.
and the certificates are also the best you can get from the certbot.