From: Frank Brehm Date: Tue, 6 Sep 2022 07:41:13 +0000 (+0200) Subject: Fixing module pp_admintools.config X-Git-Tag: 0.5.0^2~2^2~20 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=9720f0fee986a9ee719e7c6e09db61f0b46c93de;p=pixelpark%2Fpp-admin-tools.git Fixing module pp_admintools.config --- diff --git a/lib/pp_admintools/config/__init__.py b/lib/pp_admintools/config/__init__.py index b8556b6..fc925ff 100644 --- a/lib/pp_admintools/config/__init__.py +++ b/lib/pp_admintools/config/__init__.py @@ -29,7 +29,7 @@ from ..errors import PpError from ..xlate import XLATOR CONFIG_DIR = 'pixelpark' -__version__ = '0.1.3' +__version__ = '0.1.4' LOG = logging.getLogger(__name__) VALID_MAIL_METHODS = ('smtp', 'sendmail') @@ -62,7 +62,11 @@ class PpBaseConfiguration(BaseMultiConfig): current_user_name = pwd.getpwuid(os.getuid()).pw_name current_user_gecos = pwd.getpwuid(os.getuid()).pw_gecos - default_mail_from = MailAddress(user=current_user_name, domain=socket.getfqdn()) + default_domain = socket.getfqdn() + if not MailAddress.re_valid_domain.search(default_domain): + default_domain = 'pixelpark.com' + + default_mail_from = MailAddress(user=current_user_name, domain=default_domain) # ------------------------------------------------------------------------- def __init__(