feat(config): load default values from Config(), not chatmail.ini.f#853
Conversation
e5b75bd to
6d28cf0
Compare
6d28cf0 to
13dd647
Compare
j4n
left a comment
There was a problem hiding this comment.
lgtm; one issue I see is that now we have two places there are defaults; probably we should generate the chatmail.ini.f from the config.py defaults?
Hm, I think the better approach is commenting out the values in chatmail.ini.f, then the defaults in config.py count if you don't explicitly uncomment them. This is how many other config formats are doing it as well. The commented out values still document the default values for new users, but if we forget to update them, nothing breaks. And it's clear to us that the commented out line isn't the meaningful one. |
4f8b958 to
bce0595
Compare
bce0595 to
fef67b8
Compare
hpk42
left a comment
There was a problem hiding this comment.
lgtm! would remove the port configuration from chatmail.ini.f
| # SMTP outgoing filtermail and reinjection | ||
| filtermail_smtp_port = 10080 | ||
| postfix_reinject_port = 10025 | ||
| #filtermail_smtp_port = 10080 | ||
| #postfix_reinject_port = 10025 | ||
|
|
||
| # SMTP incoming filtermail and reinjection | ||
| filtermail_smtp_port_incoming = 10081 | ||
| postfix_reinject_port_incoming = 10026 | ||
| #filtermail_smtp_port_incoming = 10081 | ||
| #postfix_reinject_port_incoming = 10026 | ||
|
|
There was a problem hiding this comment.
i'd remove them entirely from chatmail.ini
filtermail_http_port_incoming and filtermail_lmtp_port_transport are already missing.
If someone really wants to fiddle at this level, they need to read the source for config.py.
We should not rely on the chatmail.ini.f default config file for filling the empty values, but do this in the python3 Config() constructor. This enables #852 to have different default values for older chatmail.ini files than for more recent configs, and is generally more consistent.