From: Frank Brehm Date: Wed, 18 May 2022 11:46:59 +0000 (+0200) Subject: Fixing class MailConfiguration in module pp_admintools.mail_config X-Git-Tag: 0.4.2^2~5^2~6 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=a28964aa49034d9f9598b437a41ddd30d634b08e;p=pixelpark%2Fpp-admin-tools.git Fixing class MailConfiguration in module pp_admintools.mail_config --- 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