mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
remove SMTP CLI flags. SMTP is now handles as app config in db (#949)
This commit is contained in:
parent
a8b8e0fd50
commit
de3794b17b
1 changed files with 0 additions and 22 deletions
|
|
@ -50,14 +50,6 @@ type AppConfig struct {
|
|||
InviteTokenValidityPeriod time.Duration
|
||||
}
|
||||
|
||||
// SMTPConfig defines configs related to SMTP email
|
||||
type SMTPConfig struct {
|
||||
Server string
|
||||
Username string
|
||||
Password string
|
||||
PoolConnections int
|
||||
}
|
||||
|
||||
// SessionConfig defines configs related to user sessions
|
||||
type SessionConfig struct {
|
||||
KeySize int
|
||||
|
|
@ -89,7 +81,6 @@ type KolideConfig struct {
|
|||
Server ServerConfig
|
||||
Auth AuthConfig
|
||||
App AppConfig
|
||||
SMTP SMTPConfig
|
||||
Session SessionConfig
|
||||
Osquery OsqueryConfig
|
||||
Logging LoggingConfig
|
||||
|
|
@ -125,12 +116,6 @@ func (man Manager) addConfigs() {
|
|||
man.addConfigDuration("app.invite_token_validity_period", 5*24*time.Hour)
|
||||
man.addConfigInt("app.token_key_size", 24)
|
||||
|
||||
// SMTP
|
||||
man.addConfigString("smtp.server", "0.0.0.0:1025")
|
||||
man.addConfigString("smtp.username", "")
|
||||
man.addConfigString("smtp.password", "")
|
||||
man.addConfigInt("smtp.pool_connections", 4)
|
||||
|
||||
// Session
|
||||
man.addConfigInt("session.key_size", 64)
|
||||
man.addConfigDuration("session.duration", 24*90*time.Hour)
|
||||
|
|
@ -179,12 +164,6 @@ func (man Manager) LoadConfig() KolideConfig {
|
|||
TokenKey: man.getConfigString("app.token_key"),
|
||||
InviteTokenValidityPeriod: man.getConfigDuration("app.invite_token_validity_period"),
|
||||
},
|
||||
SMTP: SMTPConfig{
|
||||
Server: man.getConfigString("smtp.server"),
|
||||
Username: man.getConfigString("smtp.username"),
|
||||
Password: man.getConfigString("smtp.password"),
|
||||
PoolConnections: man.getConfigInt("smtp.pool_connections"),
|
||||
},
|
||||
Session: SessionConfig{
|
||||
KeySize: man.getConfigInt("session.key_size"),
|
||||
Duration: man.getConfigDuration("session.duration"),
|
||||
|
|
@ -402,6 +381,5 @@ func TestConfig() KolideConfig {
|
|||
Debug: true,
|
||||
DisableBanner: true,
|
||||
},
|
||||
SMTP: SMTPConfig{},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue