If your app sends email — transactional or marketing — three DNS records decide whether it lands in the inbox or the spam folder: SPF, DKIM, and DMARC. Here's how to look them up and sanity-check them in Python, no third-party API required.

Install the one dependency:

pip install dnspython

Enter fullscreen mode

Exit fullscreen mode