SIGN IN SIGN UP

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
C
Cameron Little committed
df057edf09f242a45f5e38e0e2678c4e914725bf
Parent: 6c5d330
Committed by GitHub <noreply@github.com> on 1/14/2026, 11:18:34 PM