config: add smtp timeout to global_relay settings (#14994)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
90ff87a77f
Коммит
e6e563360b
@@ -718,6 +718,7 @@ func (s *Server) trackConfig() {
|
|||||||
"is_default_global_relay_smtp_username": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpUsername, ""),
|
"is_default_global_relay_smtp_username": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpUsername, ""),
|
||||||
"is_default_global_relay_smtp_password": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpPassword, ""),
|
"is_default_global_relay_smtp_password": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpPassword, ""),
|
||||||
"is_default_global_relay_email_address": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.EmailAddress, ""),
|
"is_default_global_relay_email_address": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.EmailAddress, ""),
|
||||||
|
"global_relay_smtp_server_timeout": *cfg.EmailSettings.SMTPServerTimeout,
|
||||||
})
|
})
|
||||||
|
|
||||||
s.SendDiagnostic(TRACK_CONFIG_DISPLAY, map[string]interface{}{
|
s.SendDiagnostic(TRACK_CONFIG_DISPLAY, map[string]interface{}{
|
||||||
|
|||||||
@@ -2609,10 +2609,11 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GlobalRelayMessageExportSettings struct {
|
type GlobalRelayMessageExportSettings struct {
|
||||||
CustomerType *string // must be either A9 or A10, dictates SMTP server url
|
CustomerType *string // must be either A9 or A10, dictates SMTP server url
|
||||||
SmtpUsername *string
|
SmtpUsername *string
|
||||||
SmtpPassword *string
|
SmtpPassword *string
|
||||||
EmailAddress *string // the address to send messages to
|
EmailAddress *string // the address to send messages to
|
||||||
|
SMTPServerTimeout *int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GlobalRelayMessageExportSettings) SetDefaults() {
|
func (s *GlobalRelayMessageExportSettings) SetDefaults() {
|
||||||
@@ -2628,6 +2629,9 @@ func (s *GlobalRelayMessageExportSettings) SetDefaults() {
|
|||||||
if s.EmailAddress == nil {
|
if s.EmailAddress == nil {
|
||||||
s.EmailAddress = NewString("")
|
s.EmailAddress = NewString("")
|
||||||
}
|
}
|
||||||
|
if s.SMTPServerTimeout == nil || *s.SMTPServerTimeout == 0 {
|
||||||
|
s.SMTPServerTimeout = NewInt(1800)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type MessageExportSettings struct {
|
type MessageExportSettings struct {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user