1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-18 14:47:03 +00:00

config: Set defaults for suffix_separators and drop_characters

This patch sets common and practical defaults for the suffix_separators ("+")
and drop_character options (".").
This commit is contained in:
Alberto Bertogli
2016-10-03 01:40:56 +01:00
parent 55b03c8cf0
commit 498bb29585
2 changed files with 12 additions and 2 deletions

View File

@@ -62,6 +62,14 @@ func Load(path string) (*Config, error) {
c.DataDir = "/var/lib/chasquid"
}
if c.SuffixSeparators == "" {
c.SuffixSeparators = "+"
}
if c.DropCharacters == "" {
c.DropCharacters = "."
}
return c, nil
}

View File

@@ -49,13 +49,15 @@ message Config {
// Suffix separator, to perform suffix removal of local users.
// For example, if you set this to "-+", email to local user
// "user-blah" and "user+blah" will be delivered to "user".
// Default: none.
// Including "+" is strongly encouraged, as it is assumed for email
// forwarding.
// Default: "+".
string suffix_separators = 9;
// Characters to drop from the user part on local emails.
// For example, if you set this to "._", email to local user
// "u.se_r" will be delivered to "user".
// Default: none.
// Default: ".".
string drop_characters = 10;
}