Our engineers have been working to enhance the Gmail IMAP experience
since we launched IMAP access last year. Now, with a new Labs feature
written by Jamie Nicolson, you can have more control over how IMAP
works with your account.
Here's what this feature can do:
- Choose which labels to sync in IMAP (Folder subscriptions)
This can be very handy if, for example, you find your mail client
choking on a big [Gmail]/All Mail folder. Just sign into Gmail and
click 'Settings,' then click the 'Labels' tab. You'll see a new
checkbox next to each of your labels called 'Show in IMAP.' If you
uncheck that box, the corresponding folder will disappear from IMAP.
- Turn off auto-expunge
If you don't know what this means, then you probably don't want to
change it.

The IMAP protocol allows messages to be marked for
deletion, a sort of limbo state where a message is still present in
the folder but is slated to be deleted the next time the folder is
expunged or compacted. When we launched Gmail IMAP, we thought it
would confuse people to have messages in this state, since there's
nothing like it in the web interface (the Trash label works
differently). So in our IMAP implementation, when you mark a message
as deleted, Gmail doesn't let it linger in that state -- it goes ahead
and deletes it from the folder completely. We call this auto-expunge.
This may have saved some people from confusion, but other users still
wanted the two-stage delete process. Now with this setting, all users
have a choice. To turn off auto-expunge, just sign into Gmail and
click 'Settings,' then click the 'Forwarding and POP/IMAP' tab. In the
'IMAP Access:' section, select 'Do not automatically expunge
messages.'
-
Trash messages when they're no longer visible through IMAP
This advanced setting also helps users replicate a non-Gmail IMAP
experience. Most IMAP systems don't share Gmail's concept of archiving
messages. Some IMAP users find this annoying; when they delete a
message, they want it really to be gone, not "hiding" in All Mail. Of
course, they could drag the message to the [Gmail]/Trash folder, but
this is more cumbersome than just deleting the message. With this
setting, whenever a message is deleted from an IMAP folder, our system
checks to see if the message is also present in any other visible IMAP
folders (those folders which haven't been hidden from IMAP). If the
message is not present in any other visible folders -- that is, the
message is about to become inaccessible through IMAP -- then Gmail
will move the message to Trash. To enable this behavior, just sign
into Gmail and click 'Settings,' then click the 'Forwarding and POP/
IMAP' tab. In the 'IMAP Access:' section, find the 'When a message is
deleted from the last visible IMAP folder:' option. Select 'Move the
message to the Gmail Trash.' If you want to take it one step further,
you can select 'Immediately delete the message forever.' That's living
dangerously!
To check out these settings, enable the Advanced IMAP Controls feature
first by signing into Gmail and then clicking 'Settings' and then
'Labs.'