-
Notifications
You must be signed in to change notification settings - Fork 26
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
Not quoting $e->{'diagnosis'} before passing to qr #179
Comments
@dzolnierz Thanks for the bug report.
% perl -MSisimai -lE 'print Sisimai->dump(shift)' ./exim-28.eml
Invalid [] range "r-h" in regex; marked by <-- HERE in m/550 Bad SPF records for [newsletter-h <-- HERE ub.com:77.55.92.138], see http://spf.pobox.com// at /usr/local/lib/perl5/site_perl/5.22.1/Sisimai/MTA/Exim.pm line 387, <GEN0> line 53. I'll try to fix the bug from tonight. |
Thanks, I look forward to seeing the fix. |
We have updated Sisiami to version 4.17.0p1 and all messages parsed smoothly. Many thanks. |
@dzolnierz Good news ! Thank you again for the bug report. This issue will be closed after the porting to the Ruby version of Sisimai. |
We're using Sisimai v4.15.0 in our internal tool to catch bouncing addresses and we've found that when remote MTA (Exim) bounces email with reason like this:
Diagnostic-Code: smtp; 550 Bad SPF records for
[newsletter-hub.com:77.55.92.138], see http://spf.pobox.com/
Our tool ends up with error:
Mar 13 15:30:55 bouncer5 bounceparser: Invalid [] range "r-h" in regex; marked by <-- HERE in m/550 Bad SPF records for [newsletter-h <-- HERE ub.com:212.182.125.16], see http://spf.pobox.com// at /usr/local/share/perl/5.20.2/Sisimai/MTA/Exim.pm line 404.
The line is:
my $rxdiagnosis = qr/$e->{'diagnosis'}/i;
The problem lies in treating r-h string in newsletter-hub.com domain like regex range. I think quoting $e->{'diagnosis'} before passing should help:
my $rxdiagnosis = qr/\Q$e->{'diagnosis'}\E/i;
But I am not sure this change would break something else.
The text was updated successfully, but these errors were encountered: