diff --git a/core/mail/protocol.py b/core/mail/protocol.py index 3639989..8fa2c3b 100644 --- a/core/mail/protocol.py +++ b/core/mail/protocol.py @@ -220,7 +220,7 @@ def receive_email(envelope, log=None): if Email.objects.filter(reference=header_message_id).exists(): # break before issue thread is created log.warning("Email already exists") - raise Exception("Email already exists") + raise SpecialMailException("Email already exists") recipient = envelope.rcpt_tos[0].lower() if envelope.rcpt_tos else header_to.lower() sender = envelope.mail_from if envelope.mail_from else header_from