🎣 Phishing & awareness
swaks
Swiss Army Knife for SMTP — test mail server config, deliverability, and SPF/DKIM/DMARC.
Why use it
swaks is the universal CLI tool for sending test emails. Validate SPF/DKIM/DMARC alignment, test mail server delivery from any source IP, and craft realistic phishing test messages without a full SMTP stack.
What you get
- SMTP test sending with full header control
- TLS testing and STARTTLS verification
- Custom From, Reply-To, and Return-Path
- File attachment support
- Pipe-friendly output for scripting
System requirements
| Cpu | minimal |
|---|---|
| Ram | 50 MB |
| Disk | 5 MB |
| Os | Linux, macOS, Windows (with Perl) |
| Docker | Yes |
Installation
sudo apt install swaks. Send a test: swaks --to recipient@example.com --from test@yourdomain.com --server smtp.gmail.com:587 --auth --tls. Add --header for custom fields, --attach for files.
Suggested configuration
Use swaks to verify your DMARC alignment after any DNS change: send a test from your sending domain, check the headers in the receiving mailbox. Pair with dig on _dmarc, _dkim, _spf records.
Integration ideas
- Use as a smoke test in CI for mail-sending services
- Combine with GoPhish to validate deliverability before campaigns
Alternatives
- sendemail — Older Perl tool, similar concept.
- msmtp — More for production sending than testing.
Cyentrix verdict
In every sysadmin's muscle memory. Five minutes to install, useful forever.