Summary
can’t send email
Steps to reproduce
- mattermost version 5.19.0
- CentOS 7
I constructed according to
- https://docs.mattermost.com/install/install-rhel-7.html
- https://docs.mattermost.com/install/smtp-email-setup.html
Expected behavior
Mail server can’t receive SMTP certification information.
Observed behavior
mattermost.log is
{
"level": "error",
"ts": 1588838428.2882004,
"caller": "mlog/log.go:174",
"msg": "Connection unsuccessful: SendMail: Failed to authenticate on SMTP server, unencrypted connection",
"path": "/api/v4/email/test",
"request_id": "xxxxxxxxxxxxxxxxxxxxx",
"ip_addr": "xxx.xxx.xxx.xxx",
"user_id": "xxxxxxxxxxxxxxxxxxxxx",
"method": "POST",
"err_where": "testEmail",
"http_code": 500,
"err_details": ""
}
The configurations ares as follows.
"EmailSettings": {
"EnableSignUpWithEmail": true,
"EnableSignInWithEmail": true,
"EnableSignInWithUsername": true,
"SendEmailNotifications": true,
"UseChannelInEmailNotifications": false,
"RequireEmailVerification": true,
"FeedbackName": "mattermost-admin",
"FeedbackEmail": "xxx@xxx",
"ReplyToAddress": "xxx@xxx",
"FeedbackOrganization": "",
"EnableSMTPAuth": true,
"SMTPUsername": "xxx@xxx",
"SMTPPassword": "xxx",
"SMTPServer": "xxx.xxx.xxx.xxx",
"SMTPPort": "xxx",
"ConnectionSecurity": "STARTTLS",
"SendPushNotifications": true,
"PushNotificationServer": "https://push-test.mattermost.com",
"PushNotificationContents": "generic",
"EnableEmailBatching": false,
"EmailBatchingBufferSize": 256,
"EmailBatchingInterval": 30,
"EnablePreviewModeBanner": false,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7"
},
Authentication of Mail server is plaintext.
I tried 6 patterns.
-
Enable SMTP Authentication: true
Connection Security: None
→Error
Connection unsuccessful: Connection unsuccessful: SendMail: Failed to authenticate on SMTP server, unencrypted connection
-
Enable SMTP Authentication: true
Connection Security: TLS
→Error
Connection unsuccessful: Connection unsuccessful: SendMail: Failed to open TLS connection, tls: first record does not look like a TLS handshake
-
Enable SMTP Authentication: true
Connection Security: STARTTLS
→Error
Connection unsuccessful: Connection unsuccessful: SendMail: Failed to authenticate on SMTP server, unencrypted connection
-
Enable SMTP Authentication: false
Connection Security: None
→Success. But Mail Server is not receive SMTP certification information. ID and password are nothing. -
Enable SMTP Authentication: false
Connection Security: TLS
→Error
Connection unsuccessful: Connection unsuccessful: SendMail: Failed to open TLS connection, tls: first record does not look like a TLS handshake
-
Enable SMTP Authentication: false
Connection Security: STARTTLS
→Success. But Mail Server is not receive SMTP certification information. ID and password are nothing.