Hello experts,

today, I found messages with this header:

        Date: Wed Jan 28 14:46:29 CET 2026

- https://datatracker.ietf.org/doc/html/rfc822#section-5.1 let me conclude: 
invalid
- spamassassin say: invalid
- python3.13 say: valid -> email.utils.parsedate() does not return 'None'

  $ printf 'import email.utils\nprint(email.utils.parsedate("Wed, 28 Jan 2026 
22:25:41 +0100"))\n' | python3.13 -
  (2026, 1, 28, 22, 25, 41, 0, 1, -1)
  $ printf 'import email.utils\nprint(email.utils.parsedate("Wed Jan 28 14:46:29 CET 
2026"))\n' | python3.13 -
  (2026, 1, 28, 14, 46, 29, 0, 1, -1)
  $ printf 'import email.utils\nprint(email.utils.parsedate("not a date"))\n' | 
python3.13 -
  None

Maybe there is no right or wrong. Does python only understand a very, very, 
very old format?

Andreas


_______________________________________________
mailop mailing list
[email protected]
https://list.mailop.org/listinfo/mailop

Reply via email to