Secure SMTP listener
This commit is contained in:
@@ -21,6 +21,12 @@ func New() *Config {
|
||||
MaxSize: env.Int("maxsize", defaultConfig.MaxSize),
|
||||
StatusMsg: env.String("statusmsg", defaultConfig.StatusMsg),
|
||||
Admins: env.Slice("admins"),
|
||||
TLS: TLS{
|
||||
Cert: env.String("tls.cert", defaultConfig.TLS.Cert),
|
||||
Key: env.String("tls.key", defaultConfig.TLS.Key),
|
||||
Required: env.Bool("tls.required"),
|
||||
Port: env.String("tls.port", defaultConfig.TLS.Port),
|
||||
},
|
||||
Sentry: Sentry{
|
||||
DSN: env.String("sentry.dsn", defaultConfig.Sentry.DSN),
|
||||
},
|
||||
|
||||
@@ -11,4 +11,7 @@ var defaultConfig = &Config{
|
||||
DSN: "local.db",
|
||||
Dialect: "sqlite3",
|
||||
},
|
||||
TLS: TLS{
|
||||
Port: "587",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ type Config struct {
|
||||
// DB config
|
||||
DB DB
|
||||
|
||||
// TLS config
|
||||
TLS TLS
|
||||
|
||||
// Sentry config
|
||||
Sentry Sentry
|
||||
}
|
||||
@@ -40,6 +43,14 @@ type DB struct {
|
||||
Dialect string
|
||||
}
|
||||
|
||||
// TLS config
|
||||
type TLS struct {
|
||||
Cert string
|
||||
Key string
|
||||
Port string
|
||||
Required bool
|
||||
}
|
||||
|
||||
// Sentry config
|
||||
type Sentry struct {
|
||||
DSN string
|
||||
|
||||
Reference in New Issue
Block a user