From de3794b17be0c870f312fbbbc8ee24189953cdd1 Mon Sep 17 00:00:00 2001 From: Victor Vrantchan Date: Fri, 13 Jan 2017 08:54:16 -0500 Subject: [PATCH] remove SMTP CLI flags. SMTP is now handles as app config in db (#949) --- server/config/config.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/server/config/config.go b/server/config/config.go index 41c42e6e6a..a664c03990 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -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{}, } }