From a28964aa49034d9f9598b437a41ddd30d634b08e Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 18 May 2022 13:46:59 +0200 Subject: [PATCH] Fixing class MailConfiguration in module pp_admintools.mail_config --- lib/pp_admintools/mail_config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pp_admintools/mail_config.py b/lib/pp_admintools/mail_config.py index 3754b49..c006ae8 100644 --- a/lib/pp_admintools/mail_config.py +++ b/lib/pp_admintools/mail_config.py @@ -69,9 +69,14 @@ class MailConfiguration(BaseMultiConfig): default_mail_server = 'localhost' default_smtp_port = 25 + default_domain = socket.getfqdn() - if not default_domain: + if default_domain is None: default_domain = DEFAULT_DOMAIN + else: + default_domain = default_domain.strip() + if default_domain == '': + default_domain = DEFAULT_DOMAIN current_user_name = pwd.getpwuid(os.getuid()).pw_name current_user_gecos = pwd.getpwuid(os.getuid()).pw_gecos -- 2.39.5