Skip to content

Commit 8fcdd48

Browse files
committed
added health scores
1 parent ddfbe22 commit 8fcdd48

File tree

9 files changed

+335
-18
lines changed

9 files changed

+335
-18
lines changed

Cargo.lock

+184
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ edition = "2021"
66
[dependencies]
77
clap = { version = "4.3", features = ["derive"] }
88
tokio = { version = "1", features = ["full"] }
9-
trust-dns-resolver = "0.23.2"
9+
trust-dns-resolver = { version = "0.23.2", features = ["dns-over-https-rustls"] }
1010
prettytable-rs = "^0.10"

README.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Domain Health (dh) CLI Tool
22

3-
A command-line interface tool for checking the email security configuration of a domain.
3+
A command-line interface tool for checking and scoring the email security configuration of a domain.
44

55
## Features
66

77
- Checks mail provider (e.g., Google, Microsoft, Mimecast)
88
- Verifies SPF (Sender Policy Framework) records
99
- Checks DMARC (Domain-based Message Authentication, Reporting, and Conformance) configuration
1010
- Verifies DKIM (DomainKeys Identified Mail) records
11+
- Calculates a health score based on SPF, DMARC, and DKIM configurations
12+
- Provides suggestions for improving email security
1113
- Displays an easy-to-read summary of domain email security
1214

1315
## Usage
@@ -31,6 +33,33 @@ The tool provides a formatted table output including:
3133
- SPF record status and trusted senders
3234
- DMARC configuration
3335
- DKIM record status
36+
- Overall health score (out of 100)
37+
- Breakdown of the health score
38+
- Suggestions for improvement
39+
40+
### Example Outputs
41+
42+
#### Healthy Domain Configuration
43+
44+
![Healthy Domain Output](images/healthy.png)
45+
46+
#### Unhealthy Domain Configuration
47+
48+
![Unhealthy Domain Output](images/unhealthy.png)
49+
50+
## Health Score Calculation
51+
52+
The health score is calculated based on the following criteria:
53+
54+
- SPF: Up to 33 points
55+
- 33 points for valid SPF with hard fail (-all)
56+
- 29 points for valid SPF with soft fail (~all)
57+
- 25 points for valid SPF without explicit fail
58+
- DMARC: Up to 34 points
59+
- 34 points for p=reject
60+
- 25 points for p=quarantine
61+
- 20 points for p=none or no policy specified
62+
- DKIM: 33 points for valid DKIM record
3463

3564
## Requirements
3665

images/healthy.png

31.8 KB
Loading

images/unhealthy.png

42.7 KB
Loading

0 commit comments

Comments
 (0)