summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorGirish Ramakrishnan <mail@girish.in>2016-09-02 11:33:26 -0700
committerJoram Wilander <jwawilander@gmail.com>2016-09-02 14:33:26 -0400
commit6c085594e47eeabbe5084a0e5c231af3e18527b6 (patch)
treead1eb6b3ad1dc813a574ffb615ca31b328bca451 /model
parentf32eb525f3fa0828a23f589d765c267e3b2aea86 (diff)
downloadchat-6c085594e47eeabbe5084a0e5c231af3e18527b6.tar.gz
chat-6c085594e47eeabbe5084a0e5c231af3e18527b6.tar.bz2
chat-6c085594e47eeabbe5084a0e5c231af3e18527b6.zip
mail: allow PLAIN auth over non-tls connections (#3900)
This allows mattermost to use a non-tls connection with a SMTP server that supports PLAIN auth (but not LOGIN). The go library explicitly allows PLAIN auth over non-tls connections - https://golang.org/src/net/smtp/auth.go#L55 Fixes #2929
Diffstat (limited to 'model')
-rw-r--r--model/config.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go
index eedd0d116..cb2d100bc 100644
--- a/model/config.go
+++ b/model/config.go
@@ -11,6 +11,7 @@ import (
const (
CONN_SECURITY_NONE = ""
+ CONN_SECURITY_PLAIN = "PLAIN"
CONN_SECURITY_TLS = "TLS"
CONN_SECURITY_STARTTLS = "STARTTLS"
@@ -964,7 +965,7 @@ func (o *Config) IsValid() *AppError {
return NewLocAppError("Config.IsValid", "model.config.is_valid.file_salt.app_error", nil, "")
}
- if !(o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_TLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS) {
+ if !(o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_TLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_PLAIN) {
return NewLocAppError("Config.IsValid", "model.config.is_valid.email_security.app_error", nil, "")
}