I would go as far as to say I have never seen an email be rejected on send. This smacks of a very specific email configuration. Perhaps cPanel or Exim. It may be configured to check the recipient before handing the email over. Turn it off, whatever it is, and they’ll be passed off to the relay as the sheer majority of servers do, and let the bounce come in as normal. It’ll then be logged and handled automatically.
I thought you were maybe getting 1 per year or something. If it’s so common you’re considering addressing it with a python script then you’ve got a problem somewhere that isn’t XF.
My Activity Summary goes back further than the default and probably further than you would think productive, but that's by choice, and what triggers these. So then each time it resends I get them again since the member was not marked invalid. However I have also had success with old members coming back.
I don’t think that’s it. I think you’ve got an overzealous email configuration. How is your mail configured? Exim? cPanel? Managed yourself on postfix / send mail? Some remotely hosted provider?
SMTP connection, WHM, the 550 errors are from email addresses that no longer exist, and the server errors can happen often (and repeatedly) when using Activity Summary that dates back many years.
The issue isn’t so much that these don’t represent genuine bounces, it’s that they’re being handled synchronously when the email is sent instead of asynchronously by accepting the message and reporting the bounce to the bounce inbox later which is what our bounce handling mechanisms have always depended on.
As far as I can see WHM/cPanel don’t have an easy way to configure it the way we’d expect but I’m still investigating.