This article (https://www.sparkpost.com/resources/email-explained/return-path-explained/) explains "Return-Path" as follows:
When an email doesn’t make it to its intended destination, the return path indicates where non-delivery receipts—or bounce messages—are to be sent.
and
Many senders will incorporate identifiers into the return path address to ease handling of reply and bounce traffic, referred to as Variable Envelope Return Path (VERP).
I understand this as: "As the email sender, you specify the Return-Path header".
However, given the following answer (https://stackoverflow.com/a/28494070/9878135), it seems as if the receiving server always overwrites Return-Path:
Setting the Return-Path: header on outbound email is pointless because it will be replaced by the recipient's MTA. If you want to control what gets written there, set the envelope sender (traditionally, sendmail -f [email protected])
I'm currently trying to build an email server that uses VERP for emails. Let's say "[email protected]" wants to send an email to the outside. "From" should be "[email protected]" while "Return-Path" should be something completely different (like "[email protected]"). When the outside email service can't deliver the email, it should send an email back to "[email protected]". My server can now lookup this bounce email in the database and inform [email protected] about the delivery failure.
I'm using Postfix to send and receive mails (and Python to construct them). However, it seems as if Return-Path is never received by other email services (such as Google Mail or ProtonMail). Google Mail doesn't show the header at all while ProtonMail overwrites it with the "From" address.
So who does set the Return-Path header and why can't other email services receive mine?