#2316 new
Max Ignatenko

Incorrect address in From field when forwarding and using address pattern

Reported by Max Ignatenko | May 7th, 2019 @ 02:23 PM

I have address pattern in account settings set to .*@my.domain. I was trying to forward an email that has ryanair@my.domain in To:, but it ended up being sent from user@my.domain (user is the auth username for both IMAP and SMTP).

Composer was correctly showing ryanair@my.domain the whole time, but then (seen in activity viewer) it got replaced with user@my.domain after I hit send button.

  • This happens only with forwarding. If I press "Reply All" and edit recipients, it gets sent from ryanair@my.domain
  • Opening "From:" dropdown in composer shows ryanair@my.domain greyed out and with (unknown identity) added. After closing the dropdown it remains greyed out, even though it was normal when the composer opened
  • Using "Customize..." option in "From:" dropdown and clicking "OK" (pre-filled with ryanair@my.domain) results in email being sent from ryanair@my.domain, so this option is somehow significantly different from automatically derived from original "To:" address.

Problem is that From value displayed by composer is different from what actually ends up sent over SMTP. I'd be fine if either composer would show user@my.domain (that would be counter-intuitive though) or, preferably, email address in outbound message was set to ryanair@my.domain.

Comments and changes to this ticket

  • benny

    benny May 7th, 2019 @ 04:46 PM

    The pattern should be \.*@my\.domain, but that does not seem to be the issue.

    It's a serious error if the From header does not show the same thing as is saved in your “Sent Messages” (and sent via SMTP). If it's reproducible then first try updating to the latest test release to see if it still happens: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane.

    (Note that Gmail is known to silently rewrite the From header -- just in case it's relevant.)

  • Max Ignatenko

    Max Ignatenko May 7th, 2019 @ 09:01 PM

    This is weird but now I can't reproduce it at all. I've updated to r5631 first, tried it - it worked fine (sent the email from ryanair@my.domain).

    Then I've downloaded r5594 to check if it still reproduces there - and it worked too! I suspect that some in-memory state, modified by some other codepath, caused this behaviour and this state got reset back to normal when the application was restarted. Another option is that my laptop's RAM is going bad, but it's relatively new and I'd probably be seeing more weird things in other applications too.

  • Max Ignatenko

    Max Ignatenko May 11th, 2019 @ 06:10 PM

    I managed to reproduce it on r5631!

    1. Find an email sent to an address matching your Address pattern (.*@my\.domain in my case)
    2. Press "Forward" on it (e.g. cmd+shift+f)
      • In the composer you will see in "From:" the address from original email's To: header
    3. In the composer click on "To:" field
    4. Start typing your own email address (i.e. the address from "Email Address(es)" in IMAP account settings) but don't click anywhere else other than "Send" button.
      • This is to prevent UI converting entered address into a "tile"
    5. Once your address is entered (possibly with completion) - hit "Send".
      • Address that email will be actually sent from will be the last one entered with "Customize..." option.

    To make debugging easier: if in step 4 you click on "Subject" field or message body, the address there will turn into a "tile" and "From:" address will also change! I suspect that hitting "Send" button just does this invisibly to the user.

    If you enter some address that is not your email address, "From:" will change to your own address. It seems that the logic that does this is confused by seeing the same address in "To:" field and attempts to do something else. And it happens when forwarding, but not when replying.

    Last time is stopped reproducing because I've sent an email using "Customize...", not because I restarted MailMate. This time I restarted it and it still reproduces :)

  • Max Ignatenko

    Max Ignatenko May 11th, 2019 @ 06:11 PM

    I feel like the logic to update "From:" when forwarding is intentionally there (even though very unexpected for me personally), but it just kicks in at a wrong point in time.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages