I noticed that when adding a smtp.yaml to the config path, the values are not being loaded on startup.
Example: no smtp.ini present in config path and smtp.yaml has contents
"!smtp.ini":
"main":
"nodes": 0
"!smtpgreeting": [ "This is some custom greeting!"]
The logoutput on startup then includes:
Overriding file smtp.ini with config from /usr/local/haraka/config/smtp.yaml
Overriding file smtpgreeting with config from /usr/local/haraka/config/smtp.yaml
[WARN] [-] [core] smtp.ini.nodes unset, using 1, see https://github.com/haraka/Haraka/wiki/Performance-Tuning
which tells me, that my override was not applied.
Printing out the contents of Server.cfg at where this message is being printed yields:
which apparently are the passed default booleans in the Server.config.get('smtp.ini'...... call in Server.load_smtp_ini.
Weirdly enough, the !smtpgreeting override works and is being loaded/used.
edit: this problem only applies to .ini file overrides
I also tried to comment out the default booleans in Server.load_smtp_ini and in this case the !smpt.ini override is being loaded correctly.
I suspect that there could be a problem in configfile.js, specifically in get_cache_key() regarding the way booleans are handled there since I noticed that they get appended to the name for some reason?
Maybe I also have a misconception about how this mechanism is supposed to work, especially regarding the booleans.
The documentation is a little bit sparse on this detail.
I noticed that when adding a
smtp.yaml
to the config path, the values are not being loaded on startup.Example: no
smtp.ini
present in config path andsmtp.yaml
has contentsThe logoutput on startup then includes:
which tells me, that my override was not applied.
Printing out the contents of
Server.cfg
at where this message is being printed yields:which apparently are the passed default booleans in the
Server.config.get('smtp.ini'......
call inServer.load_smtp_ini
.Weirdly enough, the
!smtpgreeting
override works and is being loaded/used.edit: this problem only applies to
.ini
file overridesI also tried to comment out the default booleans in
Server.load_smtp_ini
and in this case the!smpt.ini
override is being loaded correctly.I suspect that there could be a problem in
configfile.js
, specifically inget_cache_key()
regarding the way booleans are handled there since I noticed that they get appended to the name for some reason?Maybe I also have a misconception about how this mechanism is supposed to work, especially regarding the booleans. The documentation is a little bit sparse on this detail.
Any help or pointers would be welcome!