4 ms·
Is that statement being downvoted because it's incorrect? (I have no idea, just asking because that statement appears relevant.)
by mLuby 5y ago
Is that statement being downvoted because it's incorrect? (I have no idea, just asking because that statement appears relevant.)
- GauntletWizard 5y agoLabels 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#access_to_gmail_labels_x-gm-labels https://developers.google.com/gmail/imap/imap-extensions#acc...
- cycomanic 5y agoI 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.