Alpine configuration tricks

I'm old-fashioned (and old...) so I am more comfortable with a text-based email client and the Gmail interface is a bit annoying. Recently, Illinois Tech forced us all to go to Gmail and eliminate all of our departmental email servers. After a lot of trial and error and cursing, I came up with a configuration that integrates my three Gmail accounts with roles to enable emailing from different accounts and lets me continue to use my favorite client, Alpine.

Alpine and Gmail

How Gmail treats messages

By default Gmail keeps all emails received and sent in a folder called "All Mail" and attaches labels to each message which determine where you see it in the web interface. Incoming mail is tagged as "Inbox" and when you move it to another folder a new label is attached and it no longer appears in "Inbox" but still resides in "All Mail". Messages you send appear in "Sent" (but in Alpine this is a sub-folder called "Sent Mail", more on that later) and will be tagged as "Inbox" if it is part of a thread which includes messages received.

Settings in Gmail

In order to work well with Alpine, there are certain settings which need to be changed in Gmail. Under "Forwarding and POP/IMAP" there are three important IMAP settings to enable.

       IMAP Access: Status: IMAP is enabled
Enable IMAP
Disable IMAP
When I mark a message in IMAP as deleted:
Auto-Expunge on - Immediately update the server. (default)
Auto-Expunge off - Wait for the client to update the server.
When a message is marked as deleted and expunged from the last visible IMAP folder:
Archive the message (default)
Move the message to the Trash
Immediately delete the message forever

The second setting prevents Gmail from automatically deleting messages marked with a "D" in Alpine until you apply the "X" (expunge command).

The third setting moves expunged messages into the "Trash" folder of Gmail which will delete them forever after 30 days. If this is not set, messages will remain in "All Mail" and simply be archived.

Under "Labels" you need to hide "All Mail" from the Alpine IMAP client.

       System labels        Show in label list       
Drafts show   hide  show if unread Show in IMAP
All Mail show  hide ⬜ Show in IMAP
Spam show   hide  show if unread Show in IMAP
Settings in Alpine

One of the more important settings for Alpine is the frequency with which it contacts the IMAP server. If Alpine loses contact because of your internet service provider (Xfinity, for example...) breaking unused connections, then Alpine will stall a lot and be very frustrating. These disconnects can be avoided by setting Alpine to check for mail every 15 seconds in the INBOX and in the Incoming Folders if you have enabled this option. This will keep the connections to the Gmail IMAP server(s) alive.

For INBOX
     Mail Check Interval = 15
    
For Incoming Folders
     [ Folder Preferences ]
         [X]  Enable Incoming Folders Collection
         [X]  Enable Incoming Folders Checking
     Incoming Check Interval = 15


Last modified 06/18/2020