An issue exists in Mattermost Server prior to 3.8.2, 3.7.5, and 3.6.7. The X.509 certificate validation can be skipped for a TLS-based e-mail server.
mattermost mattermost server