The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
GMail IMAP: How to archive mail (remove from INBOX)
Hi,I've started using the Opera Mail client with Gmail IMAP. In Mutt and Apple Mail I can delete a message from INBOX and it will still remain in All Mail (it's "archived" in GMail terminology). In Opera Mail, however, when I delete a message from INBOX, it's really deleted. I don't use the Trash-folder, as I'm not interested in deleting messages, just archive them. Have anyone found a working for how to "archive" GMail mail from within the Opera mail client?
Or, create a label named "Archive" and in its properties, set the IMAP keyword to "\Deleted" (without the quotes). Then, just apply the "Archive" label to messages you want to archive.
Unsetting the trash folder was the first thing I tried, but it didn't work as expected (the messages ended up being really deleted, not archived). This behaviour is different from the other IMAP mail clients I've used (Apple Mail and Mutt).
The second solution, using a label, worked however! Is there a way to assign a label keyboard-wise (pressing just one key)? I tried in Prefs to re-assign the "k"-key from "Mark as read" to"Set label Archive", "Set label, Archive" or "Set label: Archive", but neither worked. Could you help me out with the syntax?
(Btw., I'm using Opera 11.51 (build 1087) on Mac OS X 10.7.2)
25. October 2011, 20:52:25 (edited)
I know why: do not subscribe in M2 IMAP Folders to [Gmail]\All Mail, [Gmail]\Spam and [Gmail]\Trash folders syncing for any account. You'll save on traffic and would have a mail backup in case of M2 bugging its local Mail DB (it can be easily recreated from Gmail folders). Besides, Gmail Trash and Spam (pretty accurate) web mailboxes are emptied periodically anyway. And from All Mail you can Delete sensitive messages manually after login to the web interface.
Otherwise all your mail archive may gone one day due to M2 bug, and you never know, if you need some of these messages later.

Also, note that the Bin folder is grayed out: (here I tried to unsubscribe from All Mail too, but that didn't make any difference)

Gmail IMAP settings:
* When I mark a message in IMAP as deleted: Auto-Expunge on
* When a message is marked as deleted and expunged from the last visible IMAP folder: Archive the message
25. October 2011, 22:43:52 (edited)
Originally posted by danmichaelo:
Thanks!
Unsetting the trash folder was the first thing I tried, but it didn't work as expected (the messages ended up being really deleted, not archived). This behaviour is different from the other IMAP mail clients I've used (Apple Mail and Mutt).
The second solution, using a label, worked however!
If you don't have a Trash folder set, it should work just like it does with the label. If it doesn't, that's a bug.
But, at mail.google.com, you need to have both "Auto-Expunge" and "Archive the message" selected as LeoCG mentioned.
If you do and it still doesn't work like the label, then it's a bug. I'll try to reproduce myself too.
Is there a way to assign a label keyboard-wise (pressing just one key)?
Press l (for label) to bring up the "label as" menu. Then, press the letter in the label's name that's underlined. That's about it.
Note though that what Oprera does by default ("move to "[Gmail]/Trash" when pressing del) is what's supposed to happen with Gmail IMAP so things are synced correct with mail.google.com. Before Opera did this, you had to drag to "[Gmail]/Trash" every time you wanted to delete a message. Now you can do it with just the del key like it should have been in the beginning in Opera. But, when a trash folder is not set, it should work like the label.
As for the archive label, Thunderbird has an "archive" option in the right-click menu that does the same. (Only it does a move to "[Gmail]/All Mail", which is another (and actually the proper way in Gmail IMAP) to archive a message).
If you haven't yet, make sure you read <http://operawiki.info/GmailIMAP>.
Originally posted by burnout426:
But, when a trash folder is not set, it should work like the label.
I see the problem. If you unset the trash folder, Opera will reset the trash folder automatically at the next sync. Opera's supposed to do this when you setup the account (because that's how it's supposed be for Gmail IMAP). But, it might be good if Opera allowed you to deviate to incorrect settings for the user-case you mentioned.
Still though, the better solution is to leave things alone and use the archive label until Opera supports an archive command.
Also, I still wish there was a faster way than having to press three keys (l, a, <Enter>) to archive (setting the archive label). Opera's keyboard shortcut options appears to be quite programmable. For instance Platform Mac, ? Cmd is configured to the action Open URL in new page, "opera:/help/index.html". It's almost surprising there is no action Set label, "Archive".. If it isn't, I need to file a feature suggestion too
If they're totally hidden from IMAP, then maybe unsetting an IMAP trash folder will stick and you'll get what you want. But then, you wouldn't be able to delete messages, only archive them
Why there is a need to archive any messages, when Gmail shows all messages anyway in web based [Gmail]/All Mail folder regardless whether you deleted them from any other folders or not, and whether such delete was done via M2 or Gmail web interface. You simply can't delete anything from [Gmail]/All Mail any other way, but only manually via web interface. And even in that scenario your mail is NOT deleted from Gmail server, and can possibly be returned to you upon request to Gmail support.

Am I missing something here - or my experience is different for some reason (I don't subscribe to Trash folders)?
Originally posted by arnymars:
Am I missing something here
"Archive" in Gmail IMAP terms means to remove a label. This could be the "Inbox" label or the "Starred" label or some custom label you created. You can also archive a message from "[Gmail]/Trash" or "[Gmail]/Spam" to undelete it or unmark it as spam and restore the previous labels that were set for the message before it was deleted or marked as spam.
In short, "archive" for Gmail IMAP isn't really archiving in the strictest sense.
26. October 2011, 14:32:42 (edited)
Hence, its auto "archived" by simply deleting it from a relevant folder in M2 or web interface, no need to do anything extra.Originally posted by arnymars:
Its interesting... So, what happens when a message is deleted from Gmail Inbox - does its copy in All Mail loose Inbox label automatically? I checked - it does. Hence, its auto "archived" by simply deleting it from a relevant folder in M2 or web interface, no need to do anything extra.
When the \Deleted flag is added to the message that happens yes. It's the same as dragging to "[Gmail]/All Mail".
See the "Why are there multiple copies of messages in M2?" section at <http://operawiki.info/GmailIMAP> for a visualization of how things are set up. And, see <http://files.myopera.com/burnout426/files/gmail_imap_table.html> for more info on actions.
But, when you *delete* a message (as in move it to "[Gmail]/Trash", which is what "delete" means in Gmail IMAP), the message only shows in Gmail's trash (and only shows in the "[Gmail]/Trash" IMAP folder). But, the other labels aren't actually removed. They just become inactive because the message is in the trash. The labels will become active again if the message is undeleted.
26. October 2011, 16:13:59 (edited)
Originally posted by arnymars:
Thanks. When I delete a message, it's not only shown in Gmail/Trash, but also shown in Gmail/All Mail but without label(s) anymore.
That's not correct behavior. When the message is in Gmail/Trash, it shouldn't show anywhere else, including "All Mail".
Originally posted by burnout426:
What happens if you goto mail.google.com and uncheck "show in IMAP" for both "[Gmail]/Trash" (Is it "[Google Mail]/Bin" for you?) and "Trash" ("Bin" for you?).
If they're totally hidden from IMAP, then maybe unsetting an IMAP trash folder will stick and you'll get what you want. But then, you wouldn't be able to delete messages, only archive them
Cool, that actually works
Thanks for the creative solution!!Not having the delete option is an issue, but not a big one. I prefer to be able to archive quickly, and I can always open the webmail interface if I want to delete something.
I don't sync Gmail/All Mail for mail preservation safety (since M2 is always buggy, though getting better). Is there a way to change current IDLE behavior from checking All Mail to checking Inbox only for each Gmail account? I did notice, the mail no longer pops up immediately in M2 after being sent to one of my accounts. A user should have this important control at his disposal in opera:config, since he can still deselect any folders in IMAP Opera settings, including All Mail (and if he does, he deselects it in all accounts to follow the same logic - no unneeded extra traffic plus better mail safety).
Originally posted by arnymars:
Can you explain a bit how IDLE feature in M2 works?
See <http://en.wikipedia.org/wiki/IMAP_IDLE> and <http://www.ietf.org/rfc/rfc2177.txt>.
Originally posted by arnymars:
Is there a way to change current IDLE behavior from checking All Mail to checking Inbox only for each Gmail account?
If unsubscribing from "All Mail" doesn't do it, unchecking "show in IMAP" at mail.google.com for "All Mail" might do it. If it still doesn't work, there's nothing you can do.
26. October 2011, 18:44:36 (edited)
Originally posted by arnymars:
So, M2 sends IDLE command that contains a code prompting Gmail to send updates for All Mail box only?
It has to be only one folder and it's "All Mail" because messages from there are the ones that show in Opera's views. The ones in "Inbox" and other folders are hidden in Opera's views. (By default that is. If you unsubscribe from "All Mail' and mess with other things, then it might change to "Inbox" or might not or might mess up others things)
There's nothing in opera:config to change this.
26. October 2011, 18:56:50 (edited)
Lets say, I want to stay independent of M2 or another mail client bugs (current or future) or human errors - hope you recognize this right?
Originally posted by arnymars:
like I'll always do to prevent mail from being deleted by M2
M2 doesn't delete mail unless you tell it to. I don't know why you have this fear of "All Mail".
Did you try unchecking "Show in IMAP" at mail.google.com for "All Mail" instead of just unsubscribing from it?
Originally posted by arnymars:
No, because Gmail Search won't work properly after that.
That's doesn't make sense at all.
26. October 2011, 19:24:42 (edited)
If a user deleted a message from Inbox, it doesn't mean he wanted to delete it from All Mail as well - may be all he wanted is to remove Inbox Flag from that message, as Gmail does - for a reason! If a user deleted a message from All Mail - he probably wanted to delete it from his account.
Originally posted by arnymars:
Why?
That setting hides "All Mail" from IMAP. It doesn't affect any searching at mail.google.com. And, in Opera, since you said you already unsubscribe from "All Mail" anyway, going further and hiding it from IMAP isn't going to make a difference with search.
When you're unsubscribed from "All Mail", all your messages are in "Inbox" or other IMAP folders that you're subscribed to. Opera will index them all so you can search them.
Originally posted by arnymars:
Yes, M2 can delete stuff by human error too, but in the past it did such things on its own
If you accidentally press del on a message, it'll just be moved to "[Gmail]/Trash" where you can undelete it.
If you think that M2 might delete things on its own, what makes you think unsubscribing from "All Mail" will help?
If you're afraid of a client deleting stuff on you on its own, you should just use another client. I wouldn't put up with that if Opera did that to me with Gmail IMAP. But, it doesn't and works fine.
26. October 2011, 22:13:14 (edited)
Just a precaution... Other mail clients aren't immune of bugs as well, while M2 is great convenience feature integrated in Opera.M2 logic must not contradict Gmail logic:
If M2 deletes a message from Inbox, it should be merely unflagged in All Mail, but not deleted from it, regardless whether one syncs Gmail/Trash or not. In web account Trash is always sinced, but it doesn't result in a deleted from Inbox message also being deleted from All Mail.
Forums » Opera for Windows/Mac/Linux » Opera mail, chat and news