SPF and MAIL FROM rewriting
Let's understand two concepts first, SPF and MAIL FROM.
The SMTP protocol has a section for MAIL FROM. You can imagine this as the sender address on an envelope. It is not necessary to open the envelope and read your letter just to know where it came from. If there's any problem with the delivery of your letter, it goes back to your sender address.
SPF (Sender Policy Framework) is a method to allow or block email servers for sending email for a certain domain. mox and Stalwart give you hints about how to set up SPF records for your domain. While these setup guides know about your own server, they don't know about p25.dev. If you only allow your own server to send emails for your domain, and you use p25.dev as a gateway, we would not be allowed to send emails on your behalf.
There are generally 2 ways to solve this problem. Either, you create an SPF record that explicitly allows p25.dev to send emails on your behalf. Or, we rewrite the MAIL FROM address.
Rewriting
We opted for rewriting MAIL FROM. If we relied on a correct SPF record on your end, we would need to monitor it, make sure it is properly set and react if it changes. Rewriting MAIL FROM is more work on our end, but less work for you.
To set our own SPF record correctly, we need to use our own domain, which is bounce.p25.dev.
We use the Sender Rewriting Scheme to encode your original
MAIL FROM in the local part of the newly generated MAIL FROM address.
If the email you tried to send comes back to us, we can reverse calculate your MAIL FROM based on the Sender Rewriting Scheme and send you a report.