-
Notifications
You must be signed in to change notification settings - Fork 937
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
Failed parse of received header containing <multiple recipients> #600
Comments
@glongman The entire set of headers for the email would be nice, if not; just the full text of the received headers will be necessary to track this down. Thanks! |
Thanks for looking at this. I will get them but it will be a little while. |
Unfortunately for reasons out of my control I can't get you the additional info you asked for. The raw text of the broken header is in the snippet I included in the original report. here it is extracted from above
Mail's parser doesn't like Sorry I can't get you more, I hope this is enough to go on. |
@glongman I've found that trying to parse Received headers is a fools errand. There are so many non-conforming MTAs out there. I've actually turned it into an UnstructuredField in our fork of Mail at SaneBox. |
FWIW, the recent parser rewrite (currently in master) will likely be able to parse this without issue. The treetop based parser in 2.5 uses the RFC2822 grammar for Received headers which as @peterkovacs mentioned is often not conformed to. RFC5322, which the new parser generally follows, specifies a much more liberal grammar for the everything before the datetime in a received header. |
@bpot I've actually had the same errors in master using the new ragel parser. That's what I was basing my comment on. |
Confirmed, still fails on current master: >> Mail::ReceivedField.new('from [192.168.1.186] ([206.248.139.39]) by mx.google.com with ESMTPSA id m10sm4741360qae.12.2013.08.06.07.40.15 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 06 Aug 2013 07:40:18 -0700 (PDT)')
Mail::Field::IncompleteParseError: Mail::ReceivedElement can not parse |from [192.168.1.186] ([206.248.139.39]) by mx.google.com with ESMTPSA id m10sm4741360qae.12.2013.08.06.07.40.15 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 06 Aug 2013 07:40:18 -0700 (PDT)|: Only able to parse up to "from [192.168.1.186] ([206.248.139.39]) by mx.google.com with ESMTPSA id m10sm4741360qae.12.2013.08.06.07.40.15 for <multiple " |
I'm receiving a similar error as well.
|
we are running mail from the 2-5-stable branch
seeing this. Is there any more info I can provide?
The text was updated successfully, but these errors were encountered: