I’m trying to set up email using our account but it’s not working, I find this error in the internal logs:
[2015/08/25 14:43:33 UTC] [EROR] Email settings are not valid err=SendMail: Failed to open TLS connection, tls: first record does not look like a TLS handshake
…
[2015/08/25 14:48:26 UTC] [EROR] An error occured while sending an email in emailTeams err=SendMail: Failed to open TLS connection, tls: first record does not look like a TLS handshake
[2015/08/25 14:48:56 UTC] [EROR] /api/v1/teams/signup:SendMail code=500 rid=51w1r6ggd3rnbruf1dcakktctc uid= ip=192.168.177.171 Failed to open TLS connection [details: tls: first record does not look like a TLS handshake]
Any idea? I’m using the same configuration for other services
If you’ve tried UseTLS=true you might try UseTLS=false and UseStartTLS=true, but there is a bug preventing UseStartTLS from working on 0.6 so you would need to try with a daily build or wait approx 1 week for 0.7.
I’ve tried but now I have this: [2015/09/02 08:51:52 UTC] [EROR] Email settings are not valid err=CheckMailSettings: No email settings present, mail will not be sent,
and no clue on what is wrong,
mmm, that’s embarassing, I’m sure I tried but maybe something else was not working so I return to that… @coreyhulen that worked so thanks. Now the problem is: TLS is not working still. I have to use StartTLS so I did but this is the log now:
[2015/09/02 16:10:09 UTC] [EROR] An error occured while sending an email in emailTeams err=SendMail: Failed to add to email address, 554 5.7.1 : Helo command rejected: Bad HELO
Might be because of the authentication method? In my case it’s plain, don’t know if this might help.
Regarding the link you pasted, Email Setup seems replaced by Enable Email and the link about it is 404 (smtp-email-setup.md seems missing in master).
@coreyhulen I’ve solved the issue so for the records here what happened:
The docker is presenting itself as <localhost> which is then rejected by our SMTP provider. I changed the SMTP to our relay, this fixed the problem as our server accept it using IP to make sure we are we. From my IT guy, localhost might be caused by a misconfiguration in postfix or maybe in the machine. He also told me that the emails coming from Mattermost do not have the mandatory Message-ID field set, this might be something that need to be fixed.
Thanks again for help, keep up with the good work!