Mail security

yawast mail checks how well a domain is protected against spoofing, and how well mail to it is protected in transit, from its DNS policies to each mail server’s SMTP and TLS.

yawast mail example.com
yawast mail example.com --dkim-selector s2024
yawast mail example.com --level intrusive --enable mail.open-relay

Spoofing protection

  • SPF, evaluated as receivers evaluate it. yawast follows every include and redirect, counting DNS lookups: more than 10 is a permanent error that silently disables SPF, and large policies often exceed it. It also reports +all (anyone may send, including through an include), multiple records, syntax errors, and missing includes.
  • DMARC: missing or invalid records, p=none, partial pct, subdomain policies weaker than the domain’s, and report addresses that are never sent reports because they lack the authorization record.
  • DKIM: DKIM selectors cannot be listed, so yawast tries about 50 common ones (Google, Microsoft 365, Fastmail, sending services, generic names), plus any you name with --dkim-selector. It reports keys shorter than 1024 bits, 1024-bit keys, SHA-1-only keys, and keys in testing mode.
  • Domains that send no mail can still be spoofed. They should publish v=spf1 -all and a DMARC policy of p=reject, and yawast checks that they do.

Mail in transit

  • MTA-STS: the record, and the policy fetched with its certificate validated, as sending servers do. It is checked against the MX hosts, and testing mode is reported.
  • DANE records on each MX host, checked against the certificate served, and their DNSSEC signatures.
  • TLS-RPT reporting.

Each mail server

yawast connects to each MX host on port 25:

  • SMTP: STARTTLS missing or failing, login offered before TLS, and VRFY and EXPN revealing addresses. The greeting, extensions, and software are recorded.
  • TLS: the full TLS checks over STARTTLS.
    • Certificate problems count only when the domain’s MTA-STS policy is in enforce mode. Without it, sending servers don’t validate MX certificates, so these findings are informational, and each says why.
    • Hosts run by a hosted provider (Google Workspace, Microsoft 365, Proofpoint, and others) get the SMTP checks only, since their TLS is the provider’s; --mx-tls all includes them.
  • Open relay (opt-in, --level intrusive): yawast offers mail between reserved example domains and stops at the recipient. It never sends a message.

--max-mx limits how many hosts are scanned (10), and hosts that share addresses are scanned once. Outbound port 25 is blocked on many networks, including most cloud and home ones. If it is blocked, the report says so and the DNS checks still run.

Client endpoints

The domain’s submission, IMAP, and POP3 endpoints come from SRV records, its autoconfiguration file, or the usual host names (mail., imap., smtp.). yawast checks each one as a mail client would: TLS offered, login refused before TLS, and a certificate the client accepts.