Follow

Posting incase any IMAP/SMTP buffs follow me:

Gmail copies whatever is sent via SMTP into IMAP. If you try to APPEND the same message to Sent, you get a dupe.

If you APPEND to All Mail though, then immediately store a \Sent label, it doesn't duplicate…90% of the time.

So why does this work most of the time, but sometimes fail?

When it's working the server seems to return both EXPUNGE and EXISTS simultaneously. If it fails, you only get an EXISTS.

I could detect if I'm connected to Gmail and just not append of course, but I'd like to understand what's happening.

Inspecting Apple Mail's traffic, I can see it's appending to All Mail as well, but it doesn't seem to ever duplicate. Perplexing.

If anyone knows anything I'd be very interested!

Had a poke around Thunderbird's source to see how they stop Gmail duplicating messages…

…turns out they just hide them in their UI…

@phill lol maybe gmail has a special rule for the apple mail client

@noim yeah I thought that too, but spoofing the agent name doesn’t make a difference.

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.