return 550 instead of 421 in case of SMTPRecipientsRefused

This commit is contained in:
Son NK 2021-06-23 19:50:42 +02:00
parent 945496f67d
commit 70b51b5002
2 changed files with 4 additions and 3 deletions

View file

@ -9,7 +9,7 @@ E205 = "250 SL E205 bounce handled"
E206 = "250 SL E206 Out of office" E206 = "250 SL E206 Out of office"
# 4** errors # 4** errors
E401 = "421 SL E401 Retry later" # E401 = "421 SL E401 Retry later"
E402 = "421 SL E402 Retry later" E402 = "421 SL E402 Retry later"
E403 = "421 SL E403 Retry later" E403 = "421 SL E403 Retry later"
E404 = "421 SL E404 Retry later" E404 = "421 SL E404 Retry later"
@ -36,4 +36,5 @@ E516 = "550 SL E516 invalid mailbox"
E517 = "550 SL E517 unverified mailbox" E517 = "550 SL E517 unverified mailbox"
E518 = "550 SL E518 Disabled mailbox" E518 = "550 SL E518 Disabled mailbox"
E519 = "550 SL E519 Email detected as spam" E519 = "550 SL E519 Email detected as spam"
E520 = "550 SL E24 Email cannot be sent to contact" E520 = "550 SL E520 Email cannot be sent to contact"
E521 = "550 SL E521 Cannot reach mailbox"

View file

@ -751,7 +751,7 @@ def forward_email_to_mailbox(
alias, alias,
mailbox, mailbox,
) )
return False, status.E401 return False, status.E521
else: else:
db.session.commit() db.session.commit()
return True, status.E200 return True, status.E200