SMTP password and auth error

Hi. I have Ubuntu 16.04 LTS server, that I’ve just installed and Gitlab CE on it. I installed it with install-script from Mattermost is enabled and everything works fine except SMTP notifications.

I tried to change settings from system console (in browser), but they get reset on gitlab-ctl reconfigure.

Then I tried to change directly /etc/gitlab/gitlab.rb with this settings:

mattermost['email_enable_sign_up_with_email'] = false
mattermost['email_send_email_notifications'] = true
mattermost['email_smtp_username'] = "mattermost@***.com"
mattermost['email_smtp_password'] = "***"
mattermost['email_smtp_server'] = ""
mattermost['email_smtp_port'] = 587
mattermost['email_connection_security'] = "STARTTLS"
mattermost['email_feedback_name'] = "Mattermost"
mattermost['email_feedback_email'] = "mattermost@***.com"

They look fine when I go back to system console, but it shows me auth error:

Failed to authenticate on SMTP server [details: 535 5.7.8 Username and Password not accepted.

But now if I set password in the system console to the same password from config - everything works. Until next gitlab-ctl reconfigure when password is reset again.

So how can I set password permanently?

Hi @tetafro,

It looks like there might be an issue with GitLab’s gitlab-ctl reconfigure not correctly setting the password in our config. After running a gitlab-ctl reconfigure, can you look at /var/opt/gitlab/mattermost/config.json and see if the SMTP password (and other settings) are being set correctly under EmailSettings?

If it does look like it’s being set correctly, can you then set the password from the System Console and look at config.json again. Notice any differences?

Oh, sorry. Seems the reason is different - it’s just “Test Connection” button in client. It gives an auth error message anytime the password is hidden behind asterisks. If I just paste plain text in password field instead of asterisks, test gives me successful connection (even without saving).

So here’s my client version (installed from amd64.deb from
Mattermost Desktop 1.2.1

And my system:

$ uname -a
Linux comp 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u2 (2016-06-25) x86_64 GNU/Linux
$ cat /etc/issue
LMDE 2 Betsy \n \l

Just checked from browser - it’s the same error.

Try this SMTP configurations…


Why not just log into Exchange, open the Exchange Management Console, go to Server Configuration -> Hub Transport, and setup a receive connector for your web server?
Because I don’t have access to the Exchange server Pega configuration. I can only create mailboxes with some standard properties using the portal the 3rd party is operating. I might probably ask them to change the config, but the problem is that the service is the shared exchange, they might not be willing to change anything at all

Please, look at my answer - this is not configuration issue, email works fine. The problem is that “Test connection” button doesn’t work.

Exchange? Pega? How is this related to my question?

This should be fixed with this ticket in v3.3.

1 Like