I am using FreeBSD 8.1 and just installed Alpine email client. I wonder if anybody knows how to setup Alpine to get mail from a Gmail account using IMAP.


For clarity, I'm just going to give the directions in terms of what you should add to .pinerc. You can also set all of these setting using the configuration interface if you wish.

To get your mail via IMAP:


Include this to make sure you have access to all of the various gmail folders:

folder-collections=Gmail {imap.gmail.com/ssl/user=username@gmail.com}[]

I find this useful to mimic "archiving":

default-saved-msg-folder=[Gmail]/All Mail

To send mail via gmail, you need this in .pinerc:


Also, I find that these two settings improve performance a lot:


If you want alpine to remember your password for you, you can run this command in your home directory:

 touch .pine-passfile

The first time you use alpine after running this command, you will be asked whether you want to save your password for later use each time you enter one.

| improve this answer | |
  • My problem now (which I didn't use to experience earlier, soem years ago with such a configuration) is that Gmail shows me a message with a weblink to confirm the login, but alpine (and pine) don't have have enough length for it to fit. I'd appreciate an advice how to read the weblink through Alpine and confirm the login. Here at reddit, they, too, recommend turning on "less secure" apps in Gmail. I'd rather like an explanation what is wanted by Gmail and how to make an app secure. – imz -- Ivan Zakharyaschev Dec 11 '15 at 11:08
  • And here is this problem mentioned with Gnus: superuser.com/q/963361/65570 – imz -- Ivan Zakharyaschev Dec 11 '15 at 11:20
  • 1
    I think the warning about "less secure" is a bit exaggerated. The Fetchmail FAQ has a paragraph about it actually. – Per Lundberg Jan 6 '16 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy