An open API service indexing awesome lists of open source software.

https://github.com/antoonline/python-check-all-opensrs-email-dns

Email Config Checker checks emails account spf, dns, dkim and email reachability.
https://github.com/antoonline/python-check-all-opensrs-email-dns

dkim dns email opensrs python spf

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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 [email protected]
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 [email protected]: "v=DKIM1;t=s;p=exampleaYCaVwFGAdnQIhDAQAB"
Email address [email protected] is working

Checking email address [email protected]
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 [email protected]: "v=DKIM1;t=s;p=exampleaYCaVwFGAdnQIhDAQAB"
Email address [email protected] 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](LICENSE) file for details.

## Want to connect?

Feel free to contact me on [Twitter](https://twitter.com/OnlineAnto), [DEV Community](https://dev.to/antoonline/) or [LinkedIn](https://www.linkedin.com/in/anto-online) if you have any questions or suggestions.

Or just visit my [website](https://anto.online) to see what I do.