Merge pull request #998 from simple-login/disabled-mailbox

take into account status.E518
This commit is contained in:
Adrià Casajús 2022-05-18 15:01:11 +02:00 committed by GitHub
commit cb5fea033f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2237,8 +2237,13 @@ def handle(envelope: Envelope, msg: Message) -> str:
# to know whether both successful and unsuccessful deliveries can happen at the same time # to know whether both successful and unsuccessful deliveries can happen at the same time
nb_success = len([is_success for (is_success, smtp_status) in res if is_success]) nb_success = len([is_success for (is_success, smtp_status) in res if is_success])
# ignore E518 which is a normal condition
nb_non_success = len( nb_non_success = len(
[is_success for (is_success, smtp_status) in res if not is_success] [
is_success
for (is_success, smtp_status) in res
if not is_success and smtp_status != status.E518
]
) )
if nb_success > 0 and nb_non_success > 0: if nb_success > 0 and nb_non_success > 0: