mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-08 17:51:57 +00:00
config: Support "" values for drop_characters and suffix_separators
If the `drop_characters` or `suffix_separators` options are set to "", currently instead of the empty string, their default value is used instead. This is a bug, and it also happens on other config options, but because the others have to be set in order for chasquid to function, it's not a problem in practice. Thanks Björn Busse (bbusse@github) for finding and reporting this problem, on irc and in https://github.com/albertito/chasquid/issues/25. This patch fixes the problem by marking these fields explicitly optional, which enables presence testing, as described in the protobuf documentation: https://github.com/protocolbuffers/protobuf/blob/master/docs/field_presence.md.
This commit is contained in:
@@ -67,13 +67,13 @@ message Config {
|
||||
// Including "+" is strongly encouraged, as it is assumed for email
|
||||
// forwarding.
|
||||
// Default: "+".
|
||||
string suffix_separators = 10;
|
||||
optional string suffix_separators = 10;
|
||||
|
||||
// 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: ".".
|
||||
string drop_characters = 11;
|
||||
optional string drop_characters = 11;
|
||||
|
||||
// Path where to write the mail log to.
|
||||
// If "<syslog>", log using the syslog (at MAIL|INFO priority).
|
||||
|
||||
Reference in New Issue
Block a user