mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 15:28:05 +03:00
fix remaining lint warnings
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -276,15 +276,15 @@ func (c *Config) Initialize(configDir string, isService bool) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Config) getMailClientOptions() []mail.Option {
|
func (c *Config) getMailClientOptions() []mail.Option {
|
||||||
options := []mail.Option{mail.WithPort(c.Port), mail.WithoutNoop()}
|
options := []mail.Option{mail.WithoutNoop()}
|
||||||
|
|
||||||
switch c.Encryption {
|
switch c.Encryption {
|
||||||
case 1:
|
case 1:
|
||||||
options = append(options, mail.WithSSL())
|
options = append(options, mail.WithSSLPort(false))
|
||||||
case 2:
|
case 2:
|
||||||
options = append(options, mail.WithTLSPolicy(mail.TLSMandatory))
|
options = append(options, mail.WithTLSPortPolicy(mail.TLSMandatory))
|
||||||
default:
|
default:
|
||||||
options = append(options, mail.WithTLSPolicy(mail.NoTLS))
|
options = append(options, mail.WithTLSPortPolicy(mail.NoTLS))
|
||||||
}
|
}
|
||||||
if c.User != "" {
|
if c.User != "" {
|
||||||
options = append(options, mail.WithUsername(c.User))
|
options = append(options, mail.WithUsername(c.User))
|
||||||
@@ -314,6 +314,7 @@ func (c *Config) getMailClientOptions() []mail.Option {
|
|||||||
}),
|
}),
|
||||||
mail.WithDebugLog())
|
mail.WithDebugLog())
|
||||||
}
|
}
|
||||||
|
options = append(options, mail.WithPort(c.Port))
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user