Skip to content
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

invalid domain counted as "soft bounce" #1463

Closed
MaximilianKohler opened this issue Aug 17, 2023 · 2 comments
Closed

invalid domain counted as "soft bounce" #1463

MaximilianKohler opened this issue Aug 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@MaximilianKohler
Copy link
Contributor

MaximilianKohler commented Aug 17, 2023

Version:

  • listmonk: [v2.5.1]
  • OS: [ubuntu]

I guess it's because Amazon SES is labeling it as "bounceType": "Transient", and that's what listmonk is reading? If so, perhaps the solution is to read the "status code" instead?

  "bounce": {
    "timestamp": "2023-08-17T14:40:18.000Z",
    "bounceType": "Transient",
    "feedbackId": "01110184444444444444436605-000000",
    "reportingMTA": "dns; amazonses.com",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "5.4.4",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp; 550 5.4.4 Invalid domain"
      }
    ]
  },
  "notificationType": "Bounce"
}

EDIT:

Relevant links I could find:

In my opinion, this is more of an error on Amazon's end (misclassifying), so I'll find a way to contact them as well.

@MaximilianKohler
Copy link
Contributor Author

MaximilianKohler commented Aug 18, 2023

Here are some examples, but I haven't found a complete list yet:

    "bounceType": "Transient",
        "bounceSubType": "General",
        "status": "5.4.4",
        "diagnosticCode": "smtp; 550 5.4.4 Invalid domain"
    "bounceType": "Permanent",
    "bounceSubType": "General",
        "status": "4.4.2",
        "diagnosticCode": "smtp; The email account that you tried to reach does not exist."
      }
    "bounceType": "Permanent",
    "bounceSubType": "General",
        "status": "5.1.1",
        "diagnosticCode": "smtp; 550 5.1.1 user unknown"
      }
    "bounceType": "Permanent",
    "bounceSubType": "General",
        "status": "5.1.1",
        "diagnosticCode": "smtp; 550-5.1.1 The email account that you tried to reach does not exist."
      }
    "bounceType": "Permanent",
    "bounceSubType": "General",
        "status": "5.5.0",
        "diagnosticCode": "smtp; 550 5.5.0 Requested action not taken: mailbox unavailable"
      }
    "bounceType": "Transient",
    "bounceSubType": "MailboxFull",
        "status": "4.4.7",
        "diagnosticCode": "smtp; 554 4.4.7 Message expired: unable to deliver in 840 minutes.<452-4.2.2 The email account that you tried to reach is over quota."
      }

@knadh knadh added the enhancement New feature or request label Aug 20, 2023
@knadh knadh closed this as completed in 4b05ab1 Aug 20, 2023
@MaximilianKohler
Copy link
Contributor Author

MaximilianKohler commented Aug 20, 2023

Thank you for fixing this @knadh! I think I found another one:

  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "4.4.7",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp; 550 4.4.7 Message expired: unable to deliver in 840 minutes.<421 4.4.1 Failed to establish connection>"
      }
    ]
  },
  "notificationType": "Bounce"
}
  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "4.4.7",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp; 550 4.4.7 Message expired: unable to deliver in 840 minutes.<421 4.4.0 Unable to lookup DNS for icloud.co>"
      }
    ]
  },
  "notificationType": "Bounce"
}

But this one's tricky since the full "diagnosticCode" varies, and they also use "4.4.7" for legitimate transient bounces:

  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "MailboxFull",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "4.4.7",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp; 554 4.4.7 Message expired: unable to deliver in 840 minutes.<452-4.2.2 The email account that you tried to reach is over quota. Please direct<CRLF>452-4.2.2 the recipient to<CRLF>452 4.2.2  https://support.google.com/mail/?p=OverQuotaTemp o15-20020a170902d4cf00b001bbe7fae392si3002811plg.335 - gsmtp>"
      }
    ]
  },
  "notificationType": "Bounce"
}

Though it seems consistent that they use "mailboxfull" subtype for legitimate ones, and "general" for unreachable domains:

  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "4.4.7",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp; 550 4.4.7 Message expired: unable to deliver in 840 minutes.<421 4.4.0 Unable to lookup DNS for budness.net>"
      }
    ]
  },
  "notificationType": "Bounce"
}

EDIT:

  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "action": "failed",
        "status": "5.4.14",
        "emailAddress": "[email protected]",
        "diagnosticCode": "smtp;554 5.4.14 Hop count exceeded - possible mail loop ATTR34 [HK2PEPF00006FAE.apcprd02.prod.outlook.com 2023-08-21T14:43:08.787Z 08DB9D59A1939BE8]"
      }
    ]
  },
  "notificationType": "Bounce"
}

This bounced immediately (not after some days as with the "mailbox full" transient bounces), and the email notification I got was:

Your message to [email protected] couldn't be delivered.
eg wasn't found at proton.com.

So this is another hard bounce that is being recognized as a hard bounce by everyone except Amazon SES. I sent general feedback to Amazon about this but I'm doubtful they'd do anything.

I kind of just want to count all the transient subtypes with "bounceSubType": "General", as a hard bounce. But I found one with no description, and I haven't gotten an email notification for it either:

  "bounce": {
    "bounceType": "Transient",
    "bounceSubType": "General",
    "bouncedRecipients": [
      {
        "emailAddress": "name <[email protected]>"
      }
    ]
  },
  "notificationType": "Bounce"
}

Maybe it was an "automatic response" mentioned here https://docs.aws.amazon.com/ses/latest/dg/notification-contents.html#bounce-types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants