voku / PHPMailer-BMH

Bounce Mail Handler for PHP | This is a "reboot" of PHPMailer-BMH from WorxWare.
48 stars 25 forks source link

Error in mail parsing #20

Closed gbillard-seres closed 2 years ago

gbillard-seres commented 2 years ago

Hello, There is an issue in email parsing. The regexp in line 492 from file : voku/bounce-mail-handler/src/BounceMailHandler/phpmailer-bmh_rules.php is not correct for specific bounces.

The following body is detected as an unrecognized bounce :

This is the mail system at host smtp1.yyyyyyyyy.net.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

                   The mail system

<[xxxxxx.yyyyyyy@zzzzzzzzzzz.fr](mailto:xxxxxx.yyyyyyy@zzzzzzzzzzz.fr)>: host mx.usgpeople.fr[IP] said: 550
    #5.1.0 Address rejected. (in reply to RCPT TO command)

but the following (quite similar) body is detected as rule '0048' :

This is the mail system at host smtp2.yyyyyyyyy.net.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

                   The mail system

<[xxxxxxxxx.yyyyyy@zzzzzzzzzzz.fr](mailto:xxxxxxxxx.yyyyyy@zzzzzzzzzzz.fr)>: host mx.usgpeople.fr[IP] said:
    550 #5.1.0 Address rejected. (in reply to RCPT TO command)

The 550 code is not on the same line in the two examples.

Can you fix the regex, please ? Maybe apply regex on body without carriage return ?

Thanks for your return,

Gildas BILLARD

voku commented 2 years ago

Thanks for the bug report, should be fixed in the new version 6.0.4