Yahoo and AOL use the code 5.7.9 for two related rejections:
550 5.7.9 This mail has been blocked because the sender is unauthenticated.
Yahoo requires all senders to authenticate with either SPF or DKIM.
554 5.7.9 Message not accepted for policy reasons.
The first means neither SPF nor DKIM passed for the message. The second is Yahoo's generic policy rejection;
in practice it most often means the message failed DMARC for a domain that publishes p=reject,
though Yahoo can also use it for other policy reasons such as poor reputation.
How to find the cause
- Send a test message to a Yahoo address (or another mailbox) and read the Authentication-Results header of a copy that did arrive.
- If
spfanddkimboth fail, the sending service isn't authorised for your domain. See the Gmail version of this error; the fix is the same. - If they pass but
dmarc=fail, the passing domain doesn't match your From domain. See DMARC alignment. - If everything passes, look at reputation: complaints, list quality and blocklists.
How to fix it
Turn on DKIM signing with your own domain in the service that sent the message, and make sure your SPF record includes it if it uses your domain as envelope sender. That makes both SPF and DKIM pass and align, which is what Yahoo's sender requirements ask for.