<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - When rewriting the `From:` email header, need to add real sender to `Reply-To:` header."
   href="https://bugs.llvm.org/show_bug.cgi?id=40190">40190</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>When rewriting the `From:` email header, need to add real sender to `Reply-To:` header.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Phabricator
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chandlerc@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When Phabricator is sending email on my behalf, it will rewrite the `From:`
header in order to avoid DMARC issues. This is good (if a frustrating
necessity).

However, unlike the mailing lists, Phab does not take the original contents of
the `From:` header and put them into the `Reply-To:` header. This is bad for
many reasons. First, it makes it hard (impossible?) to reliably detect what
email address is associated with the sender. Second, replies may fail to
include the sender which is surprising.

Here is the doubly re-written `From:` header from one such phab update:
```
From: Chandler Carruth via Phabricator via llvm-commits
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>>
```

And here is the `Reply-To:` header showing the original `Reply-To:` added by
Phab to capture responses, and the list has added Phab's `From:` into it, but
we have lost the original author email:
```
Reply-To: <a href="mailto:reviews+D56162+public+e080bc19d9bb39f5@reviews.llvm.org">reviews+D56162+public+e080bc19d9bb39f5@reviews.llvm.org</a>, Chandler
Carruth via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>>
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>