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

Messages with inline MIME headers are not processed #58

Open
moorereason opened this issue Apr 16, 2024 · 2 comments
Open

Messages with inline MIME headers are not processed #58

moorereason opened this issue Apr 16, 2024 · 2 comments

Comments

@moorereason
Copy link
Contributor

I've received some emails that use inline MIME headers which are silently ignored.

Sample content:

MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/mixed; boundary="17122880850.dd5Fb0.406180"


--17122880850.dd5Fb0.406180
Date: Thu, 4 Apr 2024 23:34:45 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Disposition: inline


This is a DMARC aggregate report for example.com

8 records.
8 passed.
0 failed.

Submitted by Pobox by Fastmail Pty Ltd
Generated with Mail::DMARC 1.20240313


--17122880850.dd5Fb0.406180
Date: Thu, 4 Apr 2024 23:34:45 -0400
MIME-Version: 1.0
Content-Type: application/gzip;
 name="pobox.com!example.com!1712188800!1712275199!46972001.xml.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="pobox.com!example.com!1712188800!1712275199!46972001.xml.gz"

PUT/YOUR/BASE64/STUFF/HERE==

--17122880850.dd5Fb0.406180--

At the very least, it would help to log a message:

[WARN] extractAttachment: inline MIME headers are not currently supported, skip

The underlying issue is here:

switch h := p.Header.(type) {
case *mail.AttachmentHeader:

An offending message returns headers of type *mail.InlineHeader. The go-message API for inline vs attachment headers is very different. See emersion/go-message#138 for a discussion about the need for feature parity between the two types, but it doesn't appear that any work has been done.

@thx1111
Copy link

thx1111 commented Jul 14, 2024

I suppose that this is the same issue:

[INFO] files: found 243 input files in /home/james/Maildir/.dmarc/cur/
[ERROR] files: mimetype text/plain; charset=utf-8 not supported in file /home/james/Maildir/.dmarc/cur/..., skip
...
[ERROR] processFiles: reports list is empty

Since that error includes every single dmarc report received, how is dmarc-report-converter useful? Am I missing something? Do each of the dmarc report files need to be manually extracted before processing?

@moorereason
Copy link
Contributor Author

@thx1111, I think you're problem is unrelated.

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

No branches or pull requests

2 participants