Make bounce mail analysis patterns configurable
Bounce mails from recipients' mail servers are processed via Classes\Readmail.php that provides string patterns for identifying the reasons for bouncing (line 50, protected $reason_text). When it comes to keeping your address base clean, notifications on unknown users or invalid addresses (error code 550) are of special interest.
Of course the listed patterns cannot be complete but it would be desirable to be able to add new patterns to the list e.g. via TypoScript or an external file. Manually updating Readmail.php is a considerably bad idea because all changes would be gone after the next extension update.
In a recent case a newsletter of one of our customers triggered 5000 bounce mails. 1700 of those were identified as 550, most of the others were marked as "Reason unkown". After inspecting the returned content of those others as stored in the table sys_dmail_maillog, I found some additional patterns that identified 2500 more bounce mails as 550.
These are my additional patterns:
550 5\.0\.0|550 5\.1\.0|550 #5\.1\.0|550 5\.2\.1|550 5\.1\.1|said: 550|550 5\.7\.|5\.1\.0 - Unknown address|Unknown TO address|550 relaying denied|Status code 5\.1\.10|550 Denied|550 Relaying denied|It might be misspelled or it may not exist|550 Recipient Rejected|550 No such recipient|550 Invalid mailbox|550 5\.1\.6|No such user|User not known|550 User not found|is not a known user|user not exist|user invalid