techsneeze/dmarcts-report-parser

Google Reports

Closed this issue · 11 comments

Hello,

The DMARC Reports from does not show up in the DB? is that a bug?

I just tested this on the CentOS 7 system, and it was able to successfully process 7 different Google reports without any issue.

Please provide more information on errors you are seeing and why you don't think it is working. This would appear to be something unique to your system. You may have a package missing or a configuration issue.

It worked fine for me:

The Current Message is: test/1459070958.H882275P31793.asgard.bregnedalsystems.dk,S=5552
--------------------------------
Subject: Report domain: bregnedal.dk Submitter: google.com Report-ID: 9745833518407014199
MimeType: application/zip
This is a ZIP file 
body is in /tmp/msg-2094-1.zip
 serial 7293 multi record
ip=95.211.2.196
ip=80.160.77.102

I then confirmed the information made it to the DB as well.

What error messages are you seeing? Are other reports parsing OK?

only error i see are:

Use of uninitialized value in print at ./dmarcts-report-parser.pl line 396.

Can't call method "purge" on unblessed reference at ./dmarcts-report-parser.pl line 399.

When i use -d

Reports from Microsoft works, only reports from Google are not parsing

Package perl-Mail-IMAPClient-3.37-1.el7.noarch already installed and latest version
Package perl-MIME-tools-5.505-1.el7.noarch already installed and latest version
Package perl-XML-Simple-2.20-5.el7.noarch already installed and latest version
Package perl-DBI-1.627-4.el7.x86_64 already installed and latest version
Package perl-Socket6-0.23-15.el7.x86_64 already installed and latest version
Package perl-PerlIO-gzip-0.19-1.el7.x86_64 already installed and latest version
Package perl-DBD-MySQL-4.023-5.el7.x86_64 already installed and latest version
Package unzip-6.0-15.el7.x86_64 already installed and latest version

Please make sure you have the latest version of the script by doing a 'git pull' or redownloading the script (depending on how you first got it to your machine). I'm wondering if we are running different revisions of the script. I'm unable to replicate the problem as of right now. Your error points to line 396, which in the current version is for GZIP reports, but the Google report you sent me was a ZIP. So, it wouldn't make sense to be stuck in that area.

Confirm you have the latest version and try running the script again.

If you continue to have errors, please provide all of the output, similar to my example for when it worked on my test system.

root@asgard [/dmarcts-report-parser]# git pull
Already up-to-date.
root@asgard [
/dmarcts-report-parser]# ./dmarcts-report-parser.pl -d

There are 12 messages in the Inbox folder.

The Current Message UID is: 1

Subject: Mail delivery failed: returning message to sender
MimeType: multipart/report
/tmp/msg-19043-1.txt
/tmp/msg-19043-2.msg
Use of uninitialized value in print at ./dmarcts-report-parser.pl line 396.

Can't call method "purge" on unblessed reference at ./dmarcts-report-parser.pl l ine 399.
root@asgard [~/dmarcts-report-parser]#

Using the latest version

The Subject line of the message would indicate it isn't actually a DMARC report, but probably an NDR.

I'm gonna try and wipe all the mails and try again when i get reports :)

NDR goes to blackhole, i dont get any spam on that got a very good spamfilter

You should only need to delete that specific email, and any other non-DMARC reports.

The subject line in the debug output is clearly not a DMARC report, so whatever it is should be deleted.

Looks like it works now :)

`--------------------------------

The Current Message UID is: 13

Subject: Report domain: somename.dk Submitter: google.com Report-ID: 1121866261 8927815839
MimeType: application/zip
This is a ZIP file
body is in /tmp/msg-20976-1.zip
serial 1 single record
ip=95.211.2.200
Moving (copy and delete) processed IMAP message file to IMAP folder: Inbox.done
`