Skip to content

Commit b075e8b

Browse files
authored
Merge pull request #19 from steffenfritz/dmarc
DMARC support added
2 parents 6a27842 + 1d6b902 commit b075e8b

File tree

25 files changed

+402
-222
lines changed

25 files changed

+402
-222
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
mxcheck is an info scanner for e-mail servers.
44

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

2929
# Version
3030

31-
v1.5.0
31+
v1.5.1
3232

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

7070
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.
7171

72+
# Documentation and contact
73+
74+
mxcheck has a man page :)
75+
76+
Furthermore, you can find a documentation and contact information here: https://mxcheck.fritz.wtf
77+
78+
The logo was created by Alex/Lignum5. Thanks, mate :)
79+
80+
The development of this project is supported by the license for Open Source projects from Jetbrains: https://jb.gg/OpenSourceSupport

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ go 1.19
55
require (
66
github.com/jamesog/iptoasn v0.1.0
77
github.com/logrusorgru/aurora v2.0.3+incompatible
8-
github.com/miekg/dns v1.1.53
8+
github.com/miekg/dns v1.1.54
99
github.com/spf13/pflag v1.0.5
1010
)
1111

1212
require (
1313
github.com/pkg/errors v0.9.1 // indirect
1414
golang.org/x/mod v0.10.0 // indirect
15-
golang.org/x/net v0.8.0 // indirect
16-
golang.org/x/sys v0.7.0 // indirect
17-
golang.org/x/tools v0.7.0 // indirect
15+
golang.org/x/net v0.10.0 // indirect
16+
golang.org/x/sys v0.8.0 // indirect
17+
golang.org/x/tools v0.9.1 // indirect
1818
)

go.sum

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ github.com/jamesog/iptoasn v0.1.0/go.mod h1:lNWbU+KANs4wBv7Ym3HWQqJTHzB4/SlRyuLW
33
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
44
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
55
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
6-
github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw=
7-
github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
6+
github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI=
7+
github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
88
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
99
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
1010
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -13,10 +13,10 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1313
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1414
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
1515
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
16-
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
17-
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
18-
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
19-
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
20-
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
21-
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
22-
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
16+
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
17+
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
18+
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
19+
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
20+
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
21+
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
22+
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ func main() {
334334
}
335335

336336
// Recipient accepted
337+
singlemx.fakercpt = orresult.rcptboolresult
337338
if orresult.rcptboolresult {
338339
InfoLogger.Println("Recipient accepted.")
339340
} else {

output.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func writeTSV(targetHostName string, runresult runresult, blacklist bool) error
2828
err = tsv.Write([]string{"MailFrom", runresult.mailfrom})
2929
err = tsv.Write([]string{"MailTo", runresult.mailto})
3030
if !runresult.dkimresult.dkimset {
31-
err = tsv.Write([]string{"DKIM Set", "false"})
31+
err = tsv.Write([]string{"DKIM Set", "false or not checked"})
3232
} else {
3333
err = tsv.Write([]string{"DKIM Set", "true"})
3434
err = tsv.Write([]string{"DKIM DNS Entry", runresult.dkimresult.domain})
@@ -72,16 +72,16 @@ func writeTSV(targetHostName string, runresult runresult, blacklist bool) error
7272

7373
if blacklist {
7474
for bldns, blacklistresult := range runresult.bldnsnamelisted {
75-
err = tsv.Write([]string{bldns + " lists ", blacklistresult})
75+
err = tsv.Write([]string{"Blacklist " + bldns + " lists ", blacklistresult})
7676
}
7777
for bldns, blacklistresult := range runresult.bldnsnamenotlisted {
78-
err = tsv.Write([]string{bldns + " does not list ", blacklistresult})
78+
err = tsv.Write([]string{"Blacklist " + bldns + " does not list ", blacklistresult})
7979
}
8080
for bldns, blacklistresult := range runresult.bldnsiplisted {
81-
err = tsv.Write([]string{bldns + " lists ", blacklistresult})
81+
err = tsv.Write([]string{"Blacklist " + bldns + " lists ", blacklistresult})
8282
}
8383
for bldns, blacklistresult := range runresult.bldnsipnotlisted {
84-
err = tsv.Write([]string{bldns + " does not list ", blacklistresult})
84+
err = tsv.Write([]string{"Blacklist " + bldns + " does not list ", blacklistresult})
8585
}
8686
}
8787

vendor/github.com/miekg/dns/client.go

Lines changed: 15 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/miekg/dns/defaults.go

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/miekg/dns/scan.go

Lines changed: 9 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/miekg/dns/scan_rr.go

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/miekg/dns/singleinflight.go

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)