Add SMTP Honeypot
This commit is contained in:
@@ -14,6 +14,7 @@ type Config struct {
|
||||
Honeypot HoneypotConfig `toml:"Honeypot"`
|
||||
Frontend FrontendConfig `toml:"Frontend"`
|
||||
Ports PortsConfig `toml:"Ports"`
|
||||
SMTP SMTPConfig `toml:"SMTP"`
|
||||
}
|
||||
type StoreConfig struct {
|
||||
Type string `toml:"Type"`
|
||||
@@ -54,6 +55,12 @@ type PortsConfig struct {
|
||||
UDPPorts []string `toml:"UDPPorts"`
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
Enable bool `toml:"Enable"`
|
||||
Addr string `toml:"Addr"`
|
||||
EnableMetrics bool `toml:"EnableMetrics"`
|
||||
}
|
||||
|
||||
func FromReader(r io.Reader) (Config, error) {
|
||||
var c Config
|
||||
|
||||
@@ -63,6 +70,7 @@ func FromReader(r io.Reader) (Config, error) {
|
||||
c.Frontend.ListenAddr = ":8080"
|
||||
c.Frontend.LogLevel = "INFO"
|
||||
c.Frontend.AccessLogEnable = true
|
||||
c.SMTP.Addr = ":25"
|
||||
|
||||
// Read from config
|
||||
decoder := toml.NewDecoder(r)
|
||||
|
Reference in New Issue
Block a user