Files
mail-parser/resources
Cameron Little df057edf09 Fix broken receive header date parsing when tab is used in long header syntax (#130)
* Add example tests for broken received parsing in shapelib email

This comes from http://lists.maptools.org/pipermail/shapelib.mbox/shapelib.mbox, where several of the emails received headers are incorrectly parsed.

The bad parsing looks like this:

Original header value:

```
from [217.146.183.184] by nm2.bullet.mail.ukl.yahoo.com with NNFMP; 09 Mar 2011 11:19:46 -0000
```

```json
"date": {
  "year": 1911,
  "month": 219,
  "day": 3,
  "hour": 19,
  "minute": 46,
  "second": 0,
  "tz_before_gmt": true,
  "tz_hour": 0,
  "tz_minute": 0
}
```

Where the year should be 2011 and the month 3.

Weirdly, this reproduces in full message parsing, but not in the individual `received.json` tests.

This looks like it's similar to https://learn.microsoft.com/en-us/answers/questions/2737324/windows-live-mail-has-received-date-set-well-into

* Fix

* Add test case from https://github.com/stalwartlabs/mail-parser/issues/81
2026-01-15 00:18:34 +01:00
..
2023-09-04 15:23:45 +02:00
2025-01-25 15:11:41 +01:00