Add config option to force ssl connections to connect with the mailer

This commit is contained in:
kolaente 2020-07-14 17:30:39 +02:00
parent 222582fb0c
commit 092aae3260
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
4 changed files with 7 additions and 0 deletions

View file

@ -106,6 +106,8 @@ mailer:
queuelength: 100
# The timeout in seconds after which the current open connection to the mailserver will be closed.
queuetimeout: 30
# By default, vikunja will try to connect with starttls, use this option to force it to use ssl.
forcessl: false
log:
# A folder where all the logfiles should go.

View file

@ -149,6 +149,8 @@ mailer:
queuelength: 100
# The timeout in seconds after which the current open connection to the mailserver will be closed.
queuetimeout: 30
# By default, vikunja will try to connect with starttls, use this option to force it to use ssl.
forcessl: false
log:
# A folder where all the logfiles should go.

View file

@ -76,6 +76,7 @@ const (
MailerFromEmail Key = `mailer.fromemail`
MailerQueuelength Key = `mailer.queuelength`
MailerQueueTimeout Key = `mailer.queuetimeout`
MailerForceSSL Key = `mailer.forcessl`
RedisEnabled Key = `redis.enabled`
RedisHost Key = `redis.host`
@ -237,6 +238,7 @@ func InitDefaultConfig() {
MailerFromEmail.setDefault("mail@vikunja")
MailerQueuelength.setDefault(100)
MailerQueueTimeout.setDefault(30)
MailerForceSSL.setDefault(false)
// Redis
RedisEnabled.setDefault(false)
RedisHost.setDefault("localhost:6379")

View file

@ -34,6 +34,7 @@ func getDialer() *gomail.Dialer {
InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(),
ServerName: config.MailerHost.GetString(),
}
d.SSL = config.MailerForceSSL.GetBool()
return d
}