The attachment.dat file is in fact normal e-mail in the source form (headers, empty line, body).
$ file attachment.dat
attachment.dat: MIME entity text
The only difference from RFC2821 definition I can spot is the line endings. There should be Dos/Windows style CRLF line endings, as per RFC2821, but in the attachent.dat contains Unix-style LF line endings.
The attachment.dat file is in fact normal e-mail in the source form (headers, empty line, body).
$ file attachment.dat
attachment.dat: MIME entity text
The only difference from RFC2821 definition I can spot is the line endings. There should be Dos/Windows style CRLF line endings, as per RFC2821, but in the attachent.dat contains Unix-style LF line endings.