What is Nostr?
Haelwenn /элвэн/ :triskell: /
npub1ysu…2jyl
2025-02-24 11:10:28

Haelwenn /элвэн/ :triskell: on Nostr: grepped my emails for weird formats passed to the Date header somewhat out of ...

grepped my emails for weird formats passed to the Date header somewhat out of curiosity.

Spammers somehow seems to love the RFC822 format (obsoleted by RFC2822 itself obsoleted by RFC5322), but also found few spams with non-conforming formats like having AM/PM or the timezone offset being 3 digits instead of 4.

And interestingly one legitimate email I have entirely lacks timezone information.

If you're also curious of what you have and got them in a Maildir:

$ grep -r -m1 '^Date:' ${MAILDIR:-${HOME}/Maildir/} | grep -vE -e 'Date: *([MTWFS][a-z]{2}, +)?+[0-9]{1,2} +[JFMAMJJASOND][a-z]{2} +[0-9]{4} +[0-9]{2}:[0-9]{2}(:[0-9]{2})? +([+-][0-9]{4}|GMT)' # includes RFC822 format in the output
$ grep -r -m1 '^Date:' ${MAILDIR:-${HOME}/Maildir/} | grep -vE -e 'Date: *([MTWFS][a-z]{2}, +)?+[0-9]{1,2} +[JFMAMJJASOND][a-z]{2} +[0-9]{2,} +[0-9]{1,2}:[0-9]{1,2}(:[0-9]{1,2})? +([+-][0-9]{4}|GMT)' # does not includes RFC822 format in the output


(Note: I got lazy and didn't put RFC822 timezones like Z, A, M, … or UT, CST, CDT, … in the regex)
Author Public Key
npub1ysufjjd485tftr4wy2a83fqyqvtfq0yn820gl8vl6hcsdz8uv2hskx2jyl