]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Fixing class MailConfiguration in module pp_admintools.mail_config
authorFrank Brehm <frank@brehm-online.com>
Wed, 18 May 2022 11:46:59 +0000 (13:46 +0200)
committerFrank Brehm <frank@brehm-online.com>
Wed, 18 May 2022 11:46:59 +0000 (13:46 +0200)
lib/pp_admintools/mail_config.py

index 3754b49f558cc64bbe902a3efc1d3698c29ce1cc..c006ae874af3613d14567f5dd12f2a0e41b0c182 100644 (file)
@@ -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