News for hackers. Stuff that matters.
Re:Ask HN: Best hosted alternative to Google Workspace for e... by voisin on Saturday February 05, 2022 @01:52PM (#30224426)
I just did the Gmail —> iCloud transition and was frustrated that the MBOX format failed to maintain labels / folders. Everything went into a single place. On researching it seemed like the best process was to set up two IMAP accounts in Apple Mail and simply drag and drop the directories. I’ve done this, but it is still a pain and took 100x longer than I expected.
Re:Ask HN: Best hosted alternative to Google Workspace for e... by concinds on Saturday February 05, 2022 @02:06PM (#30224615)
I really don't recommend doing that with Apple Mail. I did, many years ago, and ended up losing quite a few emails due to Apple Mail bugs; I did it again a few years later and ended up with weird corruption of email headers (wrong "received" dates).

That was way before the Catalina Apple Mail data loss bugs. https://mjtsai.com/blog/2019/10/11/mail-data-loss-in-macos-1...

Any sysadmin will tell you Apple Mail has had occasional weird dogshit bugs for a decade.

Use Thunderbird, it's more likely to be robust and not corrupt your emails, then feel free to switch back to Apple Mail once you've moved everything.

Re:Ask HN: Best hosted alternative to Google Workspace for e... by crossroadsguy on Saturday February 05, 2022 @10:13PM (#30228988)
Huh it’ll start showing empty mails that’s full of text in other mail clients and web mail.

It’s been happening since 2016 (first time I noticed) and last reporter to them in January 2021. Then I gave up. It still happens.

Anyway that’s just one immortal Mail.app bug.

I am just in the process of finding another mail client (preferably native, paid, and open source that doesn’t read my mails)

Re:Ask HN: Best hosted alternative to Google Workspace for e... by Saris on Saturday February 05, 2022 @02:24PM (#30224834)
Mailstores free home version works pretty well for this. You can backup your IMAP account in it, and then it has the option to export that archive to another IMAP account. It does retain folder/label structure (although it places them under a parent "Mailstore" label, but that's easy to fix after).

It will also read EML, MSG, PST, and MBOX formats, and connect to Outlook and Thunderbird.

https://www.mailstore.com/en/products/mailstore-home/

Re:Ask HN: Best hosted alternative to Google Workspace for e... by jrnichols on Saturday February 05, 2022 @09:24PM (#30228662)
that's because Google has "labels" as their own extension to IMAP. It's non-standard and they don't care. They know it's a lock-in feature.

If you have a linux box around, the "imapsync" tool works well.

Re:Ask HN: Best hosted alternative to Google Workspace for e... by mLuby on Saturday February 05, 2022 @10:22PM (#30229061)
Is that statement being downvoted because it's incorrect? (I have no idea, just asking because that statement appears relevant.)
Re:Ask HN: Best hosted alternative to Google Workspace for e... by GauntletWizard on Sunday February 06, 2022 @03:39AM (#30230555)
Labels are representable via IMAP, but there's pretty much no relation between IMAP, Labels, and the MBOX format here - They're all ways of representing e-mails, yes, but they're basically orthogonal.

MBOX is a very simple format - It's a list of e-mails, separated by newlines. That's it, all there is to it. All metadata is in the form of e-mail headers. Those e-mail headers can be added by a variety of systems - Your MTA, the Sender's MTA, and MTA's in between (such as anti-spam appliances).

Gmail stores metadata about mail messages, and one of those metadata items is the labels that are applied to it. These are used to make searching easier, and are shown in the UI so you can select them and filter by them. Gmail Exports (via Takeout) add a "X-Gmail-Labels" Header that represents this metadata[1].

Gmail's IMAP interface shows you labels. IMAP as a protocol allows you to descend into folders, and to ask about the contents of folders. Gmail doesn't have folders, but it creates folder-like-views of your e-mail by selecting and showing messages that have those labels. It's a convenient interface, but it's a shim layer on top of Gmail, not in any way representative of how your email is stored.

The parent message is uncharitable and technically incorrect. It's not wrong that the gmail export experience sucks, but it's not right enough in the details to be a valuable contribution to the discussion in my opinion. Disclaimer: I maintained the Gmail Import API at one point in my life, and care deeply about portability.

[1] Interestingly, the header is different if you're accessing over IMAP vs from a Takeout export: https://developers.google.com/gmail/imap/imap-extensions#acc...

Re:Ask HN: Best hosted alternative to Google Workspace for e... by cycomanic on Sunday February 06, 2022 @04:32AM (#30230859)
I would argue the OP is correct gmail's implementation of labels is a proprietary extension of the IMAP standard. Now you are correct that it's not so relevant when exporting to mbox.

It should also be noted that placing labels into the message headers is a solution that can lead to information leaks, and one should be careful with it

The headers are kept (at least in some email apps) when you reply to those emails so the receiver will know your label for that message. So if you label email from your boss as "from idiot" he will know (and there are obviously more serious examples).

Regarding the Gmail labels in IMAP, I'm not sure why you talk about headers. The page you linked to is about the IMAP extension commands, AFAIK the labels do not end up in the headers in that case.