add logging

This commit is contained in:
Son NK 2020-05-09 17:48:57 +02:00
parent 295c2fd03f
commit e84e4d50c7

View file

@ -475,6 +475,7 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
mailb: Mailbox = Mailbox.get_by(email=mailbox_email) mailb: Mailbox = Mailbox.get_by(email=mailbox_email)
if ENFORCE_SPF and mailb.force_spf: if ENFORCE_SPF and mailb.force_spf:
if msg[_IP_HEADER]: if msg[_IP_HEADER]:
LOG.d("Enforce SPF")
try: try:
r = spf.check2(i=msg[_IP_HEADER], s=envelope.mail_from.lower(), h=None) r = spf.check2(i=msg[_IP_HEADER], s=envelope.mail_from.lower(), h=None)
except Exception: except Exception: