Apple Mail Conflates Two Accounts

iMac 24" M4, MacOS 15.5, Mail v.16.0 (3826.600.51.1.1)

I have my own domain for which Apple is the IMAP provider, plus a Gmail account, which I rarely use. Apple Mail seems to conflate the two accounts; sometimes my domain’s outgoing mail appears in Sent Mail in the Gmail account and sometimes in my domain; same for Trash. But this is the first time I’ve ever seen this in a reply to my email:

From: Gib Henry gibhenry@gmail.com On Behalf Of gib@gibhenry.com

What in the world does that mean? Looking at the source of my outgoing message indicates that it was sent from gib@gibhenry.com. Presumably she used a reply function, but the reply came (correctly) to gib@gibhenry.com. Because I can’t see the full headers of her message as she received it, I can’t parse this.

I don’t use Gmail often, and don’t want Google involved in my domain. What’s causing this?

P.S. There is one oddity in the source of my outgoing: a Disposition-Notification-To: header with an unrelated outdated address. Terminal command ‘defaults read’ does not turn up any hits on ‘disposition’. Where does Mail set/clear that??!

The From: header, like all mail headers, are created by the sender and can contain literally any text.

As for what it means when GMail includes that “On Behalf Of” line, it’s because the sender is sending mail through an alias. They received the mail in one mailbox, but they’re replying from a different one. Google is letting you know this, in case it matters.

In this case, it’s pretty much meaningless, but it can be very useful for actual mail delegation. For instance if you are permitting someone else (maybe an administrative assistant) to access your mail and reply on your behalf.

This header is part of requesting a return receipt (to let the sender know that the message was received and/or read). If this is in one of your outgoing messages, then you have probably configured your mail client to request these receipts.

Note that even if you are sending these requests, you probably aren’t receiving many (if any) responses, since it requires the recipient’s mail server or client to send a response. These days, most servers and clients are configured to not send these responses, because the feature has been used maliciously by spammers (e.g. to see if anyone is reading the message).

See also:

I think you missed something: this was in the reply from the person I sent email to, not in my original email. And Gmail wasn’t involved at all, as far as I can tell; I sent the original email from my domain, and the response was from a large bank.

If it came back in a reply, then either the other person forged the quoted header (unlikely) or it was in the header of your outgoing message.

The header line:

From: Gib Henry gibhenry@gmail.com On Behalf Of gib@gibhenry.com

Means that the message was sent through the GMail SMTP server (probably logged in to your GMail account), with a From: header with your gibhenry.com address.

The GMail server saw that the sending account didn’t match the message’s header and created that “on behalf of” content before transmitting it.

Since this wan’t intentional, I’d review your mail client’s configuration. It sounds like your message was sent via GMail, even though you selected your domain as the message source.

There’s another thread here discussing a similar problem with Apple Mail, where it’s sending messages via the wrong SMTP server. So far, it looks like you’re seeing another symptom of that problem.

According to the headers in my outgoing message in Mail, it was sent via my domain:

Subject: Re: Distribution
Disposition-Notification-To: <accounts@realpeople.com>
X-Universally-Unique-Identifier: C4CE188B-4FB7-446B-9F7D-84E5B7504AF1
From: gib@gibhenry.com

And neither ‘sudo locate’ nor find in the Finder (This Mac option) can locate a source of ‘accounts@realpeople.com’! It doesn’t show up in the output of ‘defaults read’ either. :thinking::unamused:

from gh.com

Interesting. realpeople.com appears to be a modeling/talent agency in Alabama.

Your outbound mail is requesting that read-receipts be sent to that accounts@realpeople.com address. Definitely a problem if you didn’t set it up. I wonder if some kind of malware may have added that configuration (maybe to the mail server, if not the client) in order to track your outbound mail.

It seems really weird that receipts would be sent to a talent agency, so I wonder if that domain was previously used for something else and this configuration has been around since that time. Or maybe it was sample code/configuration that should never have been used in a live system. If someone (an IT tech?) set up one of your mail servers, maybe he mistakenly copied that configuration from another client during the setup (copy/paste error).

It seems (from your investigation) that your mail client (Apple Mail) isn’t the source of this, but to be sure, maybe try another mail client (e.g. Thunderbird). Adding another IMAP app shouldn’t interfere with your existing mailboxes. Then try sending messages and see if they also have that header. If they do, then the source is probably your mail server.

Check your mail server’s configuration (whichever one was used - it looks like you have three, maybe four configured) so see if it may be inserting that header.

1 Like

I used to own the address; it’s now dead. I used to operate my own mail server and use Thunderbird, but since 2023 I’ve been using Apple Mail and my domain’s email is hosted by Apple.

Maybe…but I have a laptop and a desktop; it appears that only the laptop is a problem. And every time I check its outgoing servers, they showed Gmail as offline. When I update the outgoing Gmail server, both iCloud and my domain show no outgoing server (blank). It’s like whack-a-mole; I think something is seriously wrong with Apple Mail, and apparently others have a similar problem.

I did find a setting that I didn’t know about (thanks, AI!): Under Composing on the laptop, Send New Messages From: was set to “Automatically select best account,” which explains some of the problems, but not all. Maybe there’s a setting in Gmail to add a disposition-to address, but I can’t find it.

It wouldn’t be called that. That’s the name of the header. A user-facing feature is probably going to be something like “request receipts” or something similar. At least that’s what I’ve seen in Outlook and Thunderbird.

After a bit of web searching, I don’t think Apple directly supports this, but this is something you could have manually configured via the “UserHeaders” default. I found this article that describes the procedure.

What do you see if you type defaults read com.apple.mail UserHeaders ?

1 Like

You didn’t ask me, but I was curious and I’ll report.

The domain/default pair of (/Users/will/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail, UserHeaders) does not exist

(I’m not having any problems with Mail that I would ascribe to this lack of header.)

Oh, yeah, that did it, thank you! A veritable time-bomb.

 {
    "Disposition-Notification-To" = "<accounts@realpeople.com>";
}

Now, where is it, and how do I get rid of it? The Finder doesn’t find, and locate doesn’t locate either!

1 Like

Which means your installation is not configured to insert any custom headers into outgoing mail.

So at some point you (or someone else managing your computer) added this. Since there are no other UserHeader entries, you can just delete that key:

defaults delete com.apple.mail UserHeaders

As for where the preference is actually stored, there should be a file named com.apple.mail.plist somewhere within one of the various Library directories. Once upon a time, this would always be in ~/Library/Preferences, but these days it could be in many different places (including multiple files, each containing some of the com.apple.mail preferences). Which is why it is recommended to edit it with the defaults command and not by manually editing files.

If you prefer a graphical tool to the command-line defaults utility, you may want to consider PrefsEditor. Specify the preference domain (in this case, com.apple.mail) and you can immediately view and edit its various preferences. The app uses the same API as the defaults command, so it should have the same capabilities (and be equally dangerous if you make a mistake).

3 Likes