GODT-1143 Turn off SMTP server while no connection

This commit is contained in:
Michal Horejsek
2021-04-14 13:09:28 +02:00
parent fed031ebaa
commit 22bf8f62ce
5 changed files with 168 additions and 14 deletions

View File

@ -95,6 +95,7 @@ func run(b *base.Base, c *cli.Context) error { // nolint[funlen]
smtpPort := b.Settings.GetInt(settings.SMTPPortKey)
useSSL := b.Settings.GetBool(settings.SMTPSSLKey)
smtp.NewSMTPServer(
b.CrashHandler,
c.Bool(flagLogSMTP),
smtpPort, useSSL, tlsConfig, smtpBackend, b.Listener).ListenAndServe()
}()