New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise and handle exception on temporary mail failure #1210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a small change, otherwise this looks fine.
@@ -152,7 +152,9 @@ def instanciate_answer(self, lines): | |||
msg = email.message_from_string(msgtxt) | |||
temporary, permanent = all_failures(msg) | |||
|
|||
if temporary or permanent: | |||
if temporary: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if in practice this happens with Exim, but flufl
might return both email addresses with temporary failures and permanent failures, and if there are any in permanent
it should still register a bounce. So maybe this condition should be if temporary and not permanent
. (Or switch the cases round so it's if permanent ... elif temporary ... else ... end
.)
bf90034
to
ff48605
Compare
If we get a temporary failure message then ignore it as we only need to do something if the failure is permanent.
ff48605
to
b2e64e9
Compare
If we get a temporary failure message then ignore it as we only need to
do something if the failure is permanent.