I figured out how to set up alpine with Gmail so that deleted messages
go to the Gmail trash can rather than All Mail. There is a 1.5-year-
old thread about this which was never resolved, so I thought I would
post my solution. The trick is to do the following in Gmail:
1. In the IMAP settings, enable IMAP if you haven't already. You are
asked what to do when a message is expunged "from the last visible
IMAP folder." Set this to "Move to Trash." (It's up to you what to do
with the AutoExpunge option. It makes no difference for our
2. Now you have to make the All Mail folder invisible (so that it's no
longer the "last visible folder.") You'll still be able to access it
via gmail, but not via alpine. (I don't use All Mail hardly ever, and
if I need it I just open Gmail.) Go to the "Labels" settings panel,
and for "All Mail" select "hide" and uncheck the "Show in IMAP" box.
(You need to do both.)
3. Deleted and expunged emails should now go directly to Trash, and
not to All Mail. Note that you now can't archive messages from within
Alpine; the folder is invisible, so you can't move messages to it
through IMAP. However, you can still access the All Mail folder
through the Gmail interface. Look under your label list in the left
column; you'll see a link to "more" labels. If you click on it, an All
Mail link should appear.
Hope this helps someone.