mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +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:
@@ -62,6 +62,14 @@ func Load(path string) (*Config, error) {
|
|||||||
c.DataDir = "/var/lib/chasquid"
|
c.DataDir = "/var/lib/chasquid"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.SuffixSeparators == "" {
|
||||||
|
c.SuffixSeparators = "+"
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.DropCharacters == "" {
|
||||||
|
c.DropCharacters = "."
|
||||||
|
}
|
||||||
|
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,13 +49,15 @@ message Config {
|
|||||||
// Suffix separator, to perform suffix removal of local users.
|
// Suffix separator, to perform suffix removal of local users.
|
||||||
// For example, if you set this to "-+", email to local user
|
// For example, if you set this to "-+", email to local user
|
||||||
// "user-blah" and "user+blah" will be delivered to "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;
|
string suffix_separators = 9;
|
||||||
|
|
||||||
// Characters to drop from the user part on local emails.
|
// Characters to drop from the user part on local emails.
|
||||||
// For example, if you set this to "._", email to local user
|
// For example, if you set this to "._", email to local user
|
||||||
// "u.se_r" will be delivered to "user".
|
// "u.se_r" will be delivered to "user".
|
||||||
// Default: none.
|
// Default: ".".
|
||||||
string drop_characters = 10;
|
string drop_characters = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user