Skip to content
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

Add email.eml #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fynnkroeger
Copy link

This is the smalles possible Email that is completely valid according to RFC5322. It does not use obsolete syntax that MUST NOT be sent but MUST be able to be parsed according to RFC5322. The body of this message ist empty.
According to https://pretty-rfc.herokuapp.com/RFC5322#fielddefs we only need the orig-date and from header-fields to be present, the rest is optional. By following the ABNF for these we get:

orig-date
"Date:" date-time CRLF
"Date:" [ day-of-week "," ] date time [CFWS] CRLF
"Date:" date time CRLF
"Date:" day month year time CRLF
"Date:" ([FWS] 1*2DIGIT FWS) month year time CRLF
"Date:" (1*2DIGIT FWS) month year time CRLF
"Date:" ("1" " ") month year time CRLF
"Date:" "1 " month year time CRLF
"Date:1 " month year time CRLF
"Date:1 " "Aug" year time CRLF
"Date:1 Aug" year time CRLF
"Date:1 Aug" (FWS 4*DIGIT FWS) time CRLF
"Date:1 Aug" (" " "1900" " ") time CRLF
"Date:1 Aug" " 1900 " time CRLF
"Date:1 Aug 1900 " time CRLF
"Date:1 Aug 1900 " time-of-day zone CRLF
"Date:1 Aug 1900 " (hour ":" minute) zone CRLF
"Date:1 Aug 1900 " ("00" ":" minute) zone CRLF
"Date:1 Aug 1900 " ("00" ":" "00") zone CRLF
"Date:1 Aug 1900 " "00:00" zone CRLF
"Date:1 Aug 1900 00:00" zone CRLF
"Date:1 Aug 1900 00:00" (FWS ( "+" / "-" ) 4DIGIT) CRLF
"Date:1 Aug 1900 00:00" (" " "+" "0000") CRLF
"Date:1 Aug 1900 00:00" " +0000" CRLF
"Date:1 Aug 1900 00:00 +0000" CRLF

and

from
"From:" mailbox-list CRLF
"From:" (mailbox *("," mailbox)) CRLF
"From:" (mailbox) CRLF
"From:" (name-addr / addr-spec) CRLF
"From:" (addr-spec) CRLF
"From:" (local-part "@" domain) CRLF
"From:" ((dot-atom / quoted-string) "@" domain) CRLF
"From:" ((dot-atom) "@" domain) CRLF
"From:" (([CFWS] dot-atom-text [CFWS]) "@" domain) CRLF
"From:" ((dot-atom-text) "@" domain) CRLF
"From:" ((1*atext *("." 1*atext)) "@" domain) CRLF
"From:" ((1*atext) "@" domain) CRLF
"From:" ("a" "@" domain) CRLF
"From:" ("a" "@" (dot-atom / domain-literal)) CRLF
"From:" ("a" "@" (dot-atom / domain-literal)) CRLF
"From:" ("a" "@" dot-atom) CRLF  ; same as the other dot-atom
"From:" ("a" "@" "a") CRLF
"From:a@a" CRLF

This is the smalles possible Email that is completely valid according to RFC5322. It does not use obsolete syntax that MUST NOT be sent but MUST be able to be parsed according to RFC5322. The body of this message ist empty.
According to https://pretty-rfc.herokuapp.com/RFC5322#fielddefs we only need the `orig-date` and `from` header-fields to be present, the rest is optional. By following the ABNF for these we get:
```
orig-date
"Date:" date-time CRLF
"Date:" [ day-of-week "," ] date time [CFWS] CRLF
"Date:" date time CRLF
"Date:" day month year time CRLF
"Date:" ([FWS] 1*2DIGIT FWS) month year time CRLF
"Date:" (1*2DIGIT FWS) month year time CRLF
"Date:" ("1" " ") month year time CRLF
"Date:" "1 " month year time CRLF
"Date:1 " month year time CRLF
"Date:1 " "Aug" year time CRLF
"Date:1 Aug" year time CRLF
"Date:1 Aug" (FWS 4*DIGIT FWS) time CRLF
"Date:1 Aug" (" " "1900" " ") time CRLF
"Date:1 Aug" " 1900 " time CRLF
"Date:1 Aug 1900 " time CRLF
"Date:1 Aug 1900 " time-of-day zone CRLF
"Date:1 Aug 1900 " (hour ":" minute) zone CRLF
"Date:1 Aug 1900 " ("00" ":" minute) zone CRLF
"Date:1 Aug 1900 " ("00" ":" "00") zone CRLF
"Date:1 Aug 1900 " "00:00" zone CRLF
"Date:1 Aug 1900 00:00" zone CRLF
"Date:1 Aug 1900 00:00" (FWS ( "+" / "-" ) 4DIGIT) CRLF
"Date:1 Aug 1900 00:00" (" " "+" "0000") CRLF
"Date:1 Aug 1900 00:00" " +0000" CRLF
"Date:1 Aug 1900 00:00 +0000" CRLF
```
and
```
from
"From:" mailbox-list CRLF
"From:" (mailbox *("," mailbox)) CRLF
"From:" (mailbox) CRLF
"From:" (name-addr / addr-spec) CRLF
"From:" (addr-spec) CRLF
"From:" (local-part "@" domain) CRLF
"From:" ((dot-atom / quoted-string) "@" domain) CRLF
"From:" ((dot-atom) "@" domain) CRLF
"From:" (([CFWS] dot-atom-text [CFWS]) "@" domain) CRLF
"From:" ((dot-atom-text) "@" domain) CRLF
"From:" ((1*atext *("." 1*atext)) "@" domain) CRLF
"From:" ((1*atext) "@" domain) CRLF
"From:" ("a" "@" domain) CRLF
"From:" ("a" "@" (dot-atom / domain-literal)) CRLF
"From:" ("a" "@" (dot-atom / domain-literal)) CRLF
"From:" ("a" "@" dot-atom) CRLF  ; same as the other dot-atom
"From:" ("a" "@" "a") CRLF
"From:a@a" CRLF
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant