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.

Follow

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

…turns out they just hide them in their UI…

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

The home of The Not So Big Company on Mastodon.