Add config option to force ssl connections to connect with the mailer
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-07-14 17:30:39 +02:00
parent 222582fb0c
commit 092aae3260
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 7 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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