Gmail IMAP tips for Opera’s built-in mail client


Never mind the below. See the Gmail IMAP Opera Wiki page instead.

The way Gmail's IMAP implementation works and how you do operations on messages is really funky. No email client is perfectly setup to work with Gmail, which definitely makes Gmail IMAP hard to get used to.

However, now that I'm used to it and understand how it works (this is a must-read), things have been going smoothly in Opera.

With that said, here are some tips that you can follow:

Ignore all of Opera's mail access points (and "unread") except for what's under the "Mail for". Seriously, just don't pay attention to things that aren't made for Gmail.

Ignore the Trash label IMAP folder. Don't use it. It's just another label folder and really isn't a special trash folder.

Keep the [Gmail] folders list expanded at all times. You'll need it open for dragging messages from other folders to them. (As an alternative to dragging, you can select messages, right-click the selection, cut, change to another folder and then right-click and paste in the message list of another folder. The cut and paste options are available under Edit in Opera's main menu bar also.)

Don't use Opera's Spam icon to mark a message as spam. Gmail handles spam itself.

All the IMAP folders that are not under [Gmail] are labels (even INBOX).

If you want to change the label associated with a message, drag it to another label folder. If the message doesn't have a label and is just in [Gmail]/All Mail, drag it to a label folder (that includes INBOX) to apply a label.

If you want to remove a label from a message, while in the label folder, just mark the message as deleted by hitting del. Then, the message will only show in your archived messages under [Gmail]/All mail.

If you want to move a message to trash (from a label or [Gmail]/All Mail), drag it to [Gmail]/Trash. Then, if you want to totally get rid of the message, while in [Gmail]/Trash, mark the message as deleted by selecting it and pressing del.

If you want to mark a message as spam, drag it to [Gmail]/Spam. If you want to reverse that, drag it somewhere else.

Now, to delete spam, you just mark messages in [Gmail]/Spam as deleted by selecting them and pressing delete. However, before even viewing the Spam folder, you should click the view button on the toolbar for another folder's message list and choose "display" and then "list only". Then, view the spam folder and delete messages etc. When you're done, just go to another folder and change the display back to "List and messages below". That way, you won't view and download bodies of spam messages. However, you don't have to delete spam messages anyway. Gmail will do that automatically after a while.

To actually clear [Gmail]/Trash, you have to select and delete all messages in it. There's no right-click -> empty.

The reason you ignore Opera's Unread view is because unread messages from folders under [Gmail] will show up in there too and make the unread view a mess.

The reason you ignore Opera's Received view is because it will contain your Spam messages. Plus dragging from any of Opera's views to an IMAP folder will copy and paste instead of cut and paste.

Once you expand the "Mail for" access point, it's better to avoid clicking on "Mail for" as it'll show all mail for your gmail account, which may cause you do download and view message bodies for spam. It's best to stick to viewing only specfic IMAP folders.

If you click on "Mail for" and it collapses the whole access point, when you reexpand it, the [Gmail] folder view will be collapsed and you'll have to rexpand it. To avoid this, it's best to never collapse "Mail for".

One exception to ignoring Opera's access points is Opera's Drafts view under "All messages". Opera will autosave drafts *locally* there. You can open them up if you need to continue where you left off. Or, if you want to place a copy on the server, drag one (or copy and paste) to the [Gmail]/Drafts folder so that you can use it in the Gmail webmail interface. Also note though that Opera's drafts might pile up after a while. If that happens and you want to get rid of them, just delete them and then empty Opera's trash view.

Now, if you have other IMAP accounts set up in Opera, you'll want to right-click in the mail panel and choose show only "insert imap account" to show only the one IMAP account you want to work with at the moment. If you show all accounts, Opera's Unread view will be littered with unread messages in folders under [Gmail] and you might actually want to use the unread view for regular imap accounts.

Ignore [Gmail]/All Mail until you actually need to go in it. Messages that are shown in label folders are going to be shown in here too and you must resist getting bugged by the duplicate entries.

Ignore duplicate entries that show up in new mail notifications. One is just from an All Mail entry.

Ignore unread counts in folders under [Gmail]. Don't let them distract you.

Ignore the unread count on the mail panel button when you have multiple accounts and you're using "show messages from account". Even if you're not showing the gmail account, unread messages in the gmail account will affect the count on the mail panel button. This doesn't make the count on the button very useful, so just ignore it.

Don't set an IMAP sent folder in Opera's preferences. When you send messages through, they're added to [Gmail]/Sent mail automatically.

Note that when you move a message to the [Gmail]/Trash, [Gmail]/All Mail won't recognize the update until the next sync. If you can't wait, just click the All Mail folder and it will sync.

In short, Gmail is just totally different and when using any client that wasn't made specifically for it, you have to be mindful of the client's traditional IMAP UI operations and work around them. And, most of all, you just have to ignore UI parts that just don't apply to Gmail IMAP.


There is a pretty good solution to this problem.

Unsubscribe from [Gmail] and all the mailboxes in it. Then, in the webmail interface, enable the Gmail labs Advanced IMAP Controls extension under settings -> labs.

Then, under Forwarding and POP/IMAP in the webmail interface:

Do not automatically expunge messages

When a message is expunged from the last visible IMAP folder:
Move the message to the Gmail Trash

Then, Gmail pretty much works like a normal imap client and works really well with Opera


I no longer use the Gmail labs IMAP extension. Found out after all this time of deleting stuff the extension didn't remove the messages correctly and ended up with thousands of old messages. Now I just stick to doing it the hard way.

8 Replies to “Gmail IMAP tips for Opera’s built-in mail client”

  1. RavanH writes:

    There is another interesting feature to Advanced IMAP in Gmail that might work for you: You can make (for example) all IMAP folders invisible except INBOX and then you can use the default view folders (like Unread or your custom Filter views) in Opera just as was intended with the great Opera Mail client!Messages will no longer appear multiple times under Unread or Received and when you delete a message from the your default Received folder it will remain on the server untill you actually do ‘Empty Trash’ (and depending on your Gmail Advanced IMAP settings it will then be deleted permanently, be archived or moved to Gmail’s trash folder and remain there for 30 days)The only missing stap away from ‘total’ integration between Gmail and Opera is the Filter views in Opera are not automatically synced with Labels in your Gmail account. If that would be introduced as a feature, it would be perfect 😉 since the whole concept of filters in Opera is similar to Labels in Gmail!

  2. Steven writes:The “Move the message to the Gmail Trash” does work, just not the way you would think. When you hit Delete the message is removed from Opera, but on IMAP it is only marked as deleted, and stays in your Gmail Inbox. To expunge the messages (and have the extension move them all to trash) you have to right click within Opera and Empty Trash. It seems counter-intuitive, but this is when all those email messages will be moved, and show up in your GMAIL/Trash folder. It is a much better behavior than having the messages disappear, or having to drag them manually.

  3. Steven writes:I just noticed, if you do the Delete Permanently (Shift Del), it will also instantly move them to Trash and out of your Inbox.

  4. Steve Nordquist writes:What’s that about duplicates? I managed to leave ‘get mail every 5 minutes’ on when pulling down 9000 e-mails over POP3, and as a result I got more copies of things several times (6ish) before they were deleted!Do I need to go into OpenOffice or such and attach to the database and dedupe it that way, perhaps?Sorry if it’s OT since it’s not about IMAP.

  5. What’s that about duplicates?Haven’t really used Gmail with pop. Do any of the messages that got duped have labels (including the Inbox label) assigned to them?

  6. I love opera, but for gmail integration purposes, I just use affixa and a gmail desktop widget (google desktop). Sometmes you should just use the round peg for the round hole instead of trying to force in a square one.

Leave a Reply

Your email address will not be published. Required fields are marked *