1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00
This commit is contained in:
Florent Daigniere 2022-03-08 13:10:27 +01:00 committed by GitHub
parent cd3eee4c51
commit 0bfbb3bcd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,9 +159,9 @@ def postfix_sender_rate(sender):
def postfix_sender_access(sender):
""" Simply reject any sender that pretends to be from a local domain
"""
if '@' in email:
if email.startswith('<') and email.endswith('>'):
email = email[1:-1]
if '@' in sender:
if sender.startswith('<') and sender.endswith('>'):
sender = sender[1:-1]
try:
localpart, domain_name = models.Email.resolve_domain(sender)
if models.Domain.query.get(domain_name):