1
0
дзеркало https://github.com/mail-in-a-box/mailinabox.git синхронізовано 2026-03-31 21:17:23 +02:00

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

Цей коміт міститься в:
downtownallday
2022-11-20 09:07:49 -05:00
джерело 7cf55db865
коміт b810417676

Переглянути файл

@@ -93,7 +93,11 @@ def validate_email(email, mode=None):
# Check the syntax of the address. # Check the syntax of the address.
try: try:
# allow .local domains to pass when they refer to the local machine # 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 = ( test_env = (
email_domain.endswith(".local") and email_domain.endswith(".local") and
email_domain == socket.getfqdn() email_domain == socket.getfqdn()