diff --git a/app/email/status.py b/app/email/status.py index 3de514aa..6aa76ed7 100644 --- a/app/email/status.py +++ b/app/email/status.py @@ -18,6 +18,7 @@ E209 = "250 SL E209 Email Loop" E210 = "250 SL E210 Yahoo complaint handled" E211 = "250 SL E211 Bounce Forward phase handled" E212 = "250 SL E212 Bounce Reply phase handled" +E213 = "250 SL E213 Unknown email ignored" # endregion diff --git a/email_handler.py b/email_handler.py index 95be09c9..c8b40df6 100644 --- a/email_handler.py +++ b/email_handler.py @@ -2374,6 +2374,17 @@ class MailHandler: msg[headers.TO], ) return status.E524 + except VERPReply as e: + LOG.w( + "email handling fail with error:%s " + "mail_from:%s, rcpt_tos:%s, header_from:%s, header_to:%s", + e, + envelope.mail_from, + envelope.rcpt_tos, + msg[headers.FROM], + msg[headers.TO], + ) + return status.E213 except Exception as e: LOG.e( "email handling fail with error:%s "