Email communication will continue to be a significant aspect of most of our lives even beyond the foreseeable future. For an ordinary Linux user, this type of communication is key as they can easily install, configure, and use GUI email clients like Thunderbird to meet their emailing objectives.
On the other hand, there is another type of Linux user; the superuser – This user has perfected the use of the Linux operating system terminal environment to the extent of not needing the graphical user interface (GUI) anymore. Such users spend most of their time on the Linux terminal or command line environment.
In such circumstances, there is no need to keep switching from the Linux terminal to a GUI-powered web interface to check and respond to urgent emails. You only need to master how to install, configure, and use the terminal-based open-source Alpine email client.
Prerequisites
- Basic familiarity with the Linux operating system’s terminal environment.
- Access to a functioning Gmail account.
Install Alpine Email Client in Linux
Choose either of the following Alpine installation guides that are applicable to your Linux operating system distribution.
$ sudo apt-get install alpine [On Debian, Ubuntu and Mint] $ sudo yum install alpine [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux] $ sudo emerge -a sys-apps/alpine [On Gentoo Linux] $ sudo pacman -S alpine [On Arch Linux] $ sudo zypper install alpine [On OpenSUSE]
Getting Started with Alpine Email Client in Linux
From your Linux terminal, key in the following command:
$ alpine
You will be met with an interface similar to the following:
Press [Enter]
on your keyboard to proceed.
The succeeding Alpine terminal interface will look similar to the following:
To interact with either of the showcased Alpine main menu items, use the keyboard arrow keys for navigation and the [Enter]
key for selection.
Since Alpine is an email client, it can be set up to interact with a targeted email server of your choice. For this tutorial demo, we chose to use a Gmail SMTP server since almost everyone has or uses a Gmail email account to send and receive mail.
Alpine Mail Setup with Gmail Account
To set it up, navigate to the S SETUP option and hit [Enter]
on your keyboard.
Press “L”
on your keyboard to access the CollectionLists setup.
Press [Enter]
again.
The resulting interface is the one you will be using to edit the SMTP server settings related to the mail server you are using. In this case, we are going to use Gmail SMTP settings. I created a random Gmail email account for this demo. Use a Gmail email id you can access.
Make sure you have IMAP enabled by counter-checking with the following Gmail guide.
Also, the less secure app access setting on your Gmail account should be On to grant Alpine the needed access.
Back on your Alpine FOLDER COLLECTION interface, you only need to populate the Nickname and Server entries:
Port 993 forces all mail transfers to be under SSL (Secure Socket Layer). Use Ctrl+X
to save your mail server SMTP settings. You will be prompted for the password associated with the email address you used.
From the succeeding prompt, press “Y”
to exit and save changes.
It will lead to the following prompt.
Press “E”
to exit the setup.
Alpine Sending Mail with Gmail Account
We need to make additional Alpine configurations before we send any mail.
Go back to SETUP and Press “C”
to access Alpine configurations.
Next, edit SMTP Server (for sending) and Inbox Path with your values.
Press “E”
to save and exit the setup configuration.
Quit Alpine and reload it again for these changes to be effective.
$ alpine
Alpine now has access to your mail’s inbox messages.
If you access FOLDER LIST you should be able to view all the inbox items on your mail account.
Alpine Compose Mail from Gmail Account
Let us now try to compose a message from the Gmail email id we used in this tutorial.
Use Ctrl+X
to send the email and confirm with “Y”
that you want to send it.
The email message arrived as expected.
I can even reply back to it.
And access the reply from the Alpine terminal interface.
With this tutorial, you can comfortably use the Alpine email client with any mail server as long as you configure it with the correct SMTP mail server settings for sending and receiving email. It is now possible to make your Linux terminal environment your emailing environment too.
and for those of us who use a non-free service, this is pretty much a repeat of what hasn’t worked.
I have copied exactly what is on my Kubuntu 16.04 to my 20.04 (soon to be 22.04) works perfectly on 16 but I get an inbox error on 20.04.
I have been using Pine then later Alpine for many years and don’t want to give it up not to mention lose all of my saved messages. The e-mail provider can’t seem to understand why it will work on 16 but not 20 any help would be appreciated I have been forced to use my laptop for my email for almost a year.
thanks
Bob
A very good written tutorial.
I have a question: how to configure an imap yahoo in the alpine. Is it possible? Yahoo is using Oauth2.
You might get some help from this page https://alpine.x10host.com/alpine/alpine-info/misc/xoauth2.html#SettingUpYahoo