Skip to content

Email Config Checker checks emails account spf, dns, dkim and email reachability.

Notifications You must be signed in to change notification settings

AntoOnline/python-check-all-opensrs-email-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Config Checker

Email Config Checker is a Python script that checks the DNS records for a list of email accounts. The script checks the MX record, SPF record, and DKIM record for each email account and tests the SMTP connection to the MX hostname.

Requirements

  • Python 3.x
  • dnspython library (pip install dnspython)

Usage

  1. Clone or download the repository to your local machine.
  2. Rename config.ini.example to config.ini.
  3. Open the config.ini file and customize the configuration settings as needed.
  4. Run the script by typing python dns_checker.py in the command line.

The script will loop through the email accounts in the email_accounts configuration and print out the DNS records and SMTP test results for each email account.

Example output

Checking email address john@example.com
MX records for domain example.com: ['mx.example.com.cust.a.hostedemail.com.']
SPF record for domain example.com: "v=spf1 include:_spf.hostedemail.com ~all"
DKIM record for email john@example.com: "v=DKIM1;t=s;p=exampleaYCaVwFGAdnQIhDAQAB"
Email address john@example.com is working

Checking email address sarah@example.com
MX records for domain example.com: ['mx.example.com.cust.a.hostedemail.com.']
SPF record for domain example.com: "v=spf1 include:_spf.hostedemail.com ~all"
DKIM record for email sarah@example.com: "v=DKIM1;t=s;p=exampleaYCaVwFGAdnQIhDAQAB"
Email address sarah@example.com is working
Total number of failures: 0

Configuration

The config.ini file contains the following configurations:

[emails]

  • email_accounts: A list of email accounts to check, separated by a newline.

[resolver]

  • nameservers: A comma-separated list of DNS servers to use for DNS resolution.
  • timeout: The DNS resolver timeout in seconds.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Want to connect?

Feel free to contact me on Twitter, DEV Community or LinkedIn if you have any questions or suggestions.

Or just visit my website to see what I do.

About

Email Config Checker checks emails account spf, dns, dkim and email reachability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages