master
Florent Daigniere 3 years ago committed by GitHub
parent cd3eee4c51
commit 0bfbb3bcd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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):

Loading…
Cancel
Save