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

Loading…
Cancel
Save