Skip to content

Conversation

@peterguy
Copy link

@peterguy peterguy commented Oct 5, 2022

Currently, ssl_verify and timeout are being read only from the globals constants. Read them from the config file, using globals if the config file does not include the setting.
When reading ssl_verify from the config file, treat the case-insensitive values "false", "no" and "f" as False; treat all other values as True.
When reading timeout from the config file, assume Integer values.

When using ssl_verify = False, suppress warnings about self-signed (or otherwise untrusted or invalid certificates) when connecting.

When an instance of MailCow is created, read the values for `ssl_verify`
and `timeout` from the first of these to return a non-empty value:
 0. kwargs
 1. config file, "defaults" section
 2. config file, current server section
 3. globals constant
If connecting to a Mailcow instance that's using a self-signed
(or otherwise invalid) certificate, Python will emit a warning.
If ssl_verify is False, we want to connect anyway,
so suppress that warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant