1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-03 00:07:05 +00:00

management: fix crash when entering catch-all alias with no forward-to

This commit is contained in:
downtownallday 2022-11-20 09:07:49 -05:00
parent 7cf55db865
commit b810417676

View File

@ -93,7 +93,11 @@ def validate_email(email, mode=None):
# Check the syntax of the address.
try:
# allow .local domains to pass when they refer to the local machine
email_domain = get_domain(email)
try:
email_domain = get_domain(email)
except IndexError:
raise EmailNotValidError(email)
test_env = (
email_domain.endswith(".local") and
email_domain == socket.getfqdn()