Failed emails status does not work even after 3 retries

Your software
My Mautic version is: 5.0.4
My PHP version is: 8.1
My Database type and version is: 8.0

Your problem
My problem is:
I am on Mautic v5.0.4. After email-sending fails and already retried for 3 times and logs the error into /var/logs, it would still store the record down into column email_stats.is_failed as 0 which I think should actually be 1 . How can I fix this ?

These errors are showing in the log:

  • (intended errors log below)
  • failed: Connection could not be established with host “invalidhost.com:25
  • Recipient address rejected: Access denied

Steps I have tried to fix the problem:
tried to but cannot locate the code to stamp is_failed column