<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# API Reference — Implementing Email Authentication Protocols

## dig — DNS Record Queries
```bash
# SPF record
dig TXT example.com +short | grep "v=spf1"

# DKIM record
dig TXT selector1._domainkey.example.com +short

# DMARC record
dig TXT _dmarc.example.com +short

# MTA-STS DNS record
dig TXT _mta-sts.example.com +short
```

## opendkim-testkey — DKIM Validation
```bash
opendkim-testkey -d example.com -s selector1 -vvv
```

## swaks — SMTP Testing
```bash
swaks --to target@example.com --from spoofed@evil.com --server mx.example.com
```

## curl — MTA-STS Policy
```bash
curl -s https://mta-sts.example.com/.well-known/mta-sts.txt
```
