add email rotation regarding a limit

This commit is contained in:
2025-03-13 13:33:51 +01:00
parent fcb56f9a7f
commit 0c23304d34
5 changed files with 66 additions and 2 deletions

View File

@ -51,7 +51,8 @@ type RelayConfig struct {
}
type DataConfig struct {
Path string `yaml:"path" env:"FAKESMTP_DATA_PATH"`
MaxEmail int `yaml:"maxEmail" env:"FAKESMTP_DATA_MAX_EMAIL"`
Path string `yaml:"path" env:"FAKESMTP_DATA_PATH"`
}
// NewFromFile retrieves the configuration from the given file
@ -103,7 +104,8 @@ func NewDefault() *Config {
Debug: true,
},
Data: DataConfig{
Path: "fakesmtp.db",
MaxEmail: 0,
Path: "fakesmtp.db",
},
Relay: RelayConfig{
Enabled: false,