Skip to content

Commit

Permalink
Merge pull request #19 from steffenfritz/dmarc
Browse files Browse the repository at this point in the history
DMARC support added
  • Loading branch information
steffenfritz authored May 15, 2023
2 parents 6a27842 + 1d6b902 commit b075e8b
Show file tree
Hide file tree
Showing 25 changed files with 402 additions and 222 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mxcheck is an info scanner for e-mail servers.

It checks
* DNS records: A, MX, PTR, SPF, MTA-STS, DKIM
* DNS records: A, MX, PTR, SPF, MTA-STS, DKIM, DMARC
* AS Number and AS Country
* the support of StartTLS and the certificate
* open ports: 25, 465, 587
Expand All @@ -28,7 +28,7 @@ You can set mailFrom, mailTo, the DNS server, DKIM selector and output a report

# Version

v1.5.0
v1.5.1

[![Go Report Card](https://goreportcard.com/badge/github.com/steffenfritz/mxcheck)](https://goreportcard.com/report/github.com/steffenfritz/mxcheck)
[![Go Reference](https://pkg.go.dev/badge/github.com/steffenfritz/mxcheck.svg)](https://pkg.go.dev/github.com/steffenfritz/mxcheck)
Expand Down Expand Up @@ -69,3 +69,12 @@ The second one uses a from and a to address from the mail server's scope, e.g.:

If the first one returns ``Server is not an open relay`` and the second one returns `Server is probably an open relay` the server is not an open relay, but you can send mails from local to local addresses without authentication.

# Documentation and contact

mxcheck has a man page :)

Furthermore, you can find a documentation and contact information here: https://mxcheck.fritz.wtf

The logo was created by Alex/Lignum5. Thanks, mate :)

The development of this project is supported by the license for Open Source projects from Jetbrains: https://jb.gg/OpenSourceSupport
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ go 1.19
require (
github.com/jamesog/iptoasn v0.1.0
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/miekg/dns v1.1.53
github.com/miekg/dns v1.1.54
github.com/spf13/pflag v1.0.5
)

require (
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/tools v0.9.1 // indirect
)
18 changes: 9 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/jamesog/iptoasn v0.1.0/go.mod h1:lNWbU+KANs4wBv7Ym3HWQqJTHzB4/SlRyuLW
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw=
github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI=
github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -13,10 +13,10 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ func main() {
}

// Recipient accepted
singlemx.fakercpt = orresult.rcptboolresult
if orresult.rcptboolresult {
InfoLogger.Println("Recipient accepted.")
} else {
Expand Down
10 changes: 5 additions & 5 deletions output.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func writeTSV(targetHostName string, runresult runresult, blacklist bool) error
err = tsv.Write([]string{"MailFrom", runresult.mailfrom})
err = tsv.Write([]string{"MailTo", runresult.mailto})
if !runresult.dkimresult.dkimset {
err = tsv.Write([]string{"DKIM Set", "false"})
err = tsv.Write([]string{"DKIM Set", "false or not checked"})
} else {
err = tsv.Write([]string{"DKIM Set", "true"})
err = tsv.Write([]string{"DKIM DNS Entry", runresult.dkimresult.domain})
Expand Down Expand Up @@ -72,16 +72,16 @@ func writeTSV(targetHostName string, runresult runresult, blacklist bool) error

if blacklist {
for bldns, blacklistresult := range runresult.bldnsnamelisted {
err = tsv.Write([]string{bldns + " lists ", blacklistresult})
err = tsv.Write([]string{"Blacklist " + bldns + " lists ", blacklistresult})
}
for bldns, blacklistresult := range runresult.bldnsnamenotlisted {
err = tsv.Write([]string{bldns + " does not list ", blacklistresult})
err = tsv.Write([]string{"Blacklist " + bldns + " does not list ", blacklistresult})
}
for bldns, blacklistresult := range runresult.bldnsiplisted {
err = tsv.Write([]string{bldns + " lists ", blacklistresult})
err = tsv.Write([]string{"Blacklist " + bldns + " lists ", blacklistresult})
}
for bldns, blacklistresult := range runresult.bldnsipnotlisted {
err = tsv.Write([]string{bldns + " does not list ", blacklistresult})
err = tsv.Write([]string{"Blacklist " + bldns + " does not list ", blacklistresult})
}
}

Expand Down
44 changes: 15 additions & 29 deletions vendor/github.com/miekg/dns/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions vendor/github.com/miekg/dns/defaults.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 9 additions & 11 deletions vendor/github.com/miekg/dns/scan.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions vendor/github.com/miekg/dns/scan_rr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 0 additions & 61 deletions vendor/github.com/miekg/dns/singleinflight.go

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/github.com/miekg/dns/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/golang.org/x/sys/unix/mkerrors.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b075e8b

Please sign in to comment.