For example, your script might be setting the envelope sender (Return-Path) to `bounce@mail.example.com` while the From: header displays `noreply@example.com`. SPF would pass for `mail.example.com`, but the domains `mail.example.com` and `example.com` are not in alignment. Similarly, if your DKIM module is signing with a selector for `server.example.com` but the From: address is `user@example.com`, alignment fails. Check your Postfix configuration and script headers. Use `postconf -n` to see your `myorigin` and `mydomain` settings, and verify the exact domains used in your script's MIME headers versus the SMTP envelope.
This is a public discussion. Create a free account to answer. Takes 20 seconds. No email gates.