fix: properly set tls config for mailer
This commit is contained in:
parent
62325de9cd
commit
5743a4afe5
2 changed files with 10 additions and 4 deletions
|
@ -18,6 +18,7 @@ package mail
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/tls"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
|
@ -52,7 +53,12 @@ func getClient() (*mail.Client, error) {
|
||||||
mail.WithUsername(config.MailerUsername.GetString()),
|
mail.WithUsername(config.MailerUsername.GetString()),
|
||||||
mail.WithPassword(config.MailerPassword.GetString()),
|
mail.WithPassword(config.MailerPassword.GetString()),
|
||||||
mail.WithPort(config.MailerPort.GetInt()),
|
mail.WithPort(config.MailerPort.GetInt()),
|
||||||
mail.WithTLSPolicy(tlsPolicy))
|
mail.WithTLSPolicy(tlsPolicy),
|
||||||
|
//#nosec G402
|
||||||
|
mail.WithTLSConfig(&tls.Config{
|
||||||
|
InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(),
|
||||||
|
}),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartMailDaemon starts the mail daemon
|
// StartMailDaemon starts the mail daemon
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
|
||||||
"math"
|
"math"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
|
@ -25,15 +24,16 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/copier"
|
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
"code.vikunja.io/api/pkg/db"
|
"code.vikunja.io/api/pkg/db"
|
||||||
"code.vikunja.io/api/pkg/events"
|
"code.vikunja.io/api/pkg/events"
|
||||||
"code.vikunja.io/api/pkg/log"
|
"code.vikunja.io/api/pkg/log"
|
||||||
"code.vikunja.io/api/pkg/user"
|
"code.vikunja.io/api/pkg/user"
|
||||||
"code.vikunja.io/web"
|
"code.vikunja.io/web"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
"github.com/imdario/mergo"
|
"github.com/imdario/mergo"
|
||||||
|
"github.com/jinzhu/copier"
|
||||||
"xorm.io/builder"
|
"xorm.io/builder"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
"xorm.io/xorm/schemas"
|
"xorm.io/xorm/schemas"
|
||||||
|
|
Loading…
Reference in a new issue