domainaware / checkdmarc

A parser for SPF and DMARC DNS records
https://domainaware.github.io/checkdmarc
Apache License 2.0
253 stars 78 forks source link

Write unit tests and deploy CI #12

Closed seanthegeek closed 6 years ago

seanthegeek commented 6 years ago

@schack @chack-storytel You seem to have a lot of different domains that you test. Could you include a list here including super broken records SPF and, so I can make usit tests out of them to avoid regressions?

I'll hard code the domain and current record in the unit test so the tests still work even if the record ever changes :)

ghost commented 6 years ago

Sure I'll add broken stuff as I discover it. bane.dk has something that hardly can be called an SPF record: bane.dk. IN TXT "\"v=spf1 include:sharepointonline.com include:o._spf.hostedsepo.dk ~all\"" bane.dk. IN TXT "\"v=spf1 include:_spf.presscloud.com -all\""

schack commented 6 years ago

ekstrabladet.dk has an error I see very often, including something that doesn't contain an SPF record "v=spf1 include:spf.comendosystems.com include:bounce.peytz.dk include:etrack.indicia.dk include:etrack1.com include:mail1.dialogportal.com include:mail2.dialogportal.com a:mailrelay.jppol.dk a:sendmail.jppol.dk ?all"

etrack.indicia.dk is the host without an SPF record.

schack commented 6 years ago

mx.dk has a record with a missing space error: "v=spf1 a:editorial01.mx.dk a:editorial02.mx.dk a:app03.mx.dk a:app04.mx.dk a:cron01.mx.dk include:_spf.google.cominclude:spf.protection.outlook.com include:bounce.peytz.dk include:servers.mcsv.net -all"

schack commented 6 years ago

surftown.dk has a record with to much space "v=spf1 mx a:mail.cohaesio.net include: trustpilotservice.com ~all" before the trustpilotservice.com

schack commented 6 years ago

konxion.dk SPF record contains: "v=spf1 a mx include:spf.curanet.dk include:servers.mcsv.net include:_spv=spf1 a mx include:spf.curanet.dk include:servers.mcsv.net include:_spf.google.com ip4:94.231.106.116 include:mail.zendesk.com ~allf.google.com ip4:94.231.106.116 ~all include:mail.zendesk.com ?all"