Potential issues using member's “from” address and the “sender” header

前端 未结 1 971
长情又很酷
长情又很酷 2020-12-04 13:33

A major component of our application sends email to members on behalf of other members. Currently we set the \"From\" address to our system address and use a \"Reply-to\" he

相关标签:
1条回答
  • 2020-12-04 14:08

    So I decided to answer my own question since no one else responded. Perhaps others will find this entry when searching.

    What we're finally doing is this:

    Set the From header to the user's actual email address.

    From: "Mary Smith" <marysmith@memberisp.example>
    

    Use a Sender header with the system wide email address.

    Sender: <messages@company.example>
    

    Finally, the actual sender that shows up in the server supplied MAIL FROM/Return Path header is set with a unique identifier, i.e.,

    Return Path: "Mary Smith" <messages+ca54bb7482ace09f@company.example>
    

    That allows a program running at messages@company.example to intercept those auto replies and forward them onto the person they were originally intended to reach. Most real email clients will reply to the From: header. I haven't seen problems from blackberry users nor others responding to the system account.

    After a month or so in production, we've had fewer issues with this than the previous method we were using.

    The Sender header adds a small note in Microsoft Outlook clients about "On Behalf Of" but that's appropriate for our usage. There haven't been any issues with SPF in common clients/mta with this setup (Gmail, Yahoo, SpamAssassin, etc.)

    Update: In April 2014, Yahoo and AOL changed their DMARC settings to drop these kinds of messages without notice. (They switched to p=reject; see https://wordtothewise.com/2014/04/brief-dmarc-primer/ for more information.) Our solution was to special case those domains, since the needed functionality still works with the vast majority of domains.

    IF ISP MATCHES YAHOO OR AOL
    
    From: "Mary Smith" <messages+ca54bb7482ace09f@company.example>
    Reply-To: "Mary Smith" <marysmith@memberisp.example>
    Return Path: "Mary Smith" <messages+ca54bb7482ace09f@company.example>
    
    ELSE
    
    From: "Mary Smith" <marysmith@memberisp.example>
    Sender: <messages@company.example>
    Return Path: "Mary Smith" <messages+ca54bb7482ace09f@company.example>
    
    END
    
    0 讨论(0)
提交回复
热议问题