SMTP not working

Hi all,

I have been struggling to setup my SMTP using migadu email server as below. I am using
mattermost 5.14.2 on digitalocean using Ubuntu 18.04 vps.

“EmailSettings”: {
“EnableSignUpWithEmail”: true,
“EnableSignInWithEmail”: true,
“EnableSignInWithUsername”: true,
“SendEmailNotifications”: true,
“FeedbackEmail”: gulamgaus.mi@gmail.com,
“ReplyToAddress”: gulamgaus.mi@gmail.com,
“EnableSMTPAuth”: true,
“SMTPUsernname”: “admin@example.com”,
“SMTPPassword”: “*********”,
“SMTPServer”: “smtp.migadu.com”,
“SMTPPort”: “587”,
“ConnectionSecurity”: “STARTTLS”,


}

When I run test it gives me the following error message

Connection unsuccessful: Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user - undefined

I even did
telnet smtp.migadu.com 587
It gives me Trying 46.105.121.227…
Connected to smtp.migadu.com.
Escape character is ‘^]’.
220 out.migadu.com ESMTP Haraka 2.8.16. ready

Can anyone please help me to connect and test my SMTP?

Thanking you in advance.

Hi @gg_admin, can you help share your Mattermost logs? Also this earlier thread might provide some tips: SMTP configuration with SES.

Hi
Thanks for your response. Please see the mattermost logs below:
FIRST

{“level”:“error”,“ts”:1568585512.541607,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Error setting “From Address”, 550 Authentication required”,“path”:"/api/v4/email/test",“request_id”:“z1wbfm4y8fdz98mek7heqto7tw”,“ip_addr”:“86.99.125.41”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568585516.7478187,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Error setting “From Address”, 550 Authentication required”,“path”:"/api/v4/email/test",“request_id”:“j3zkxrxup7nddkydbosusc45fy”,“ip_addr”:“86.99.125.41”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568585521.3542604,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Error setting “From Address”, 550 Authentication required”,“path”:"/api/v4/email/test",“request_id”:“oiamy11bojrmubdukxgrtfxhqr”,“ip_addr”:“86.99.125.41”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568585528.900502,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“81aczx1yfjffjg4snkskw8hp1a”,“ip_addr”:“86.99.125.41”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625120.5934038,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“ik7rq3t5jtyktyphq4cepkpzwo”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625133.996765,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“qts3rngaxbfzufwiipdjc77f1y”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625148.5277739,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“r3akuae5ffdg3csr6hfqnqyoyw”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625152.840876,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“sgsiezds83ndbemaaskocrrier”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625156.5111582,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to authenticate on SMTP server, unencrypted connection”,“path”:"/api/v4/email/test",“request_id”:“ks1uf8hwxpb7de8ugjce13iddr”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568625183.9844196,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“j67ipy911ibpjdiapgo1qg4j1w”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568626501.1319425,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“ndjegfc17praiyq3gjsiqyei3a”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}
{“level”:“error”,“ts”:1568640415.314948,“caller”:“mlog/log.go:173”,“msg”:“Connection unsuccessful: SendMail: Failed to close connection to SMTP server, 550 From header does not match login user”,“path”:"/api/v4/email/test",“request_id”:“eh7cfsy93iydtm7i6i9xx91uqc”,“ip_addr”:“217.165.144.236”,“user_id”:“j3t3x9rfoigmzje8kz9apttwio”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}

NEXT
{“level”:“info”,“ts”:1567597108.2868352,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567597108.2891946,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp: lookup dockerhost: Temporary failure in name resolution”}
{“level”:"in
{“level”:“info”,“ts”:1567600211.6400585,“caller”:“utils/i18n.go:83”,“msg”:“Loaded system translations for ‘en’ from ‘/opt/mattermost/i18n/en.json’”}
{“level”:“info”,“ts”:1567600211.6436822,“caller”:“app/server_app_adapters.go:58”,“msg”:“Server is initializing…”}
{“level”:“info”,“ts”:1567600211.6454532,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600211.6606429,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600221.6612518,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600221.6615899,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600231.6617322,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600231.6620097,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600241.6622117,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600241.6624806,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600251.6625516,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600251.6628036,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600261.6629236,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600261.663303,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600271.6634388,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600271.663717,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600281.6638412,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600281.6646874,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600291.6649437,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600291.6666539,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600301.6669033,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600301.667986,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600311.6682432,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600311.6688945,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600321.669038,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}
{“level”:“error”,“ts”:1567600321.6695595,“caller”:“sqlstore/supplier.go:235”,“msg”:“Failed to ping DB retrying in 10 seconds err=dial tcp 167.71.170.31:3306: connect: connection refused”}
{“level”:“info”,“ts”:1567600331.6779685,“caller”:“sqlstore/supplier.go:223”,“msg”:“Pinging SQL master database”}

Meanwhile I will look into the link you sent perhaps might help me!

Regards

Hi amy

I think my email testing is resolved. I received the below message now

The problem was with the email that I had set it in the following labels/fields
System Console->Notifications->Notification From Address : which was of course not my personal gmail id.
System Console->Notifications->Notification Reply-To Address : which was of course not my personal gmail id.

Its working fine now!
Thanks lot

1 Like