If you are a command line lovers, I'm sure you'll use this powerful work environment to perform everyday tasks even if it is a tool, and cheering, for example, from scheduling, financial management to acquire Facebook, Twitter and other tasks . (LCTT Annotation: Another premise is reading this, if you can access Gmail or Gmail know what to say.)
In this post, I'll show you another pretty skilful use cases Linux command line: access to Google's Gmail service, for which we will use Alpine, a multi-functional ncurses-based command-line mail client (not to Alpine Linux confused). We will configure Gmail IMAP and SMTP settings in Alphine in, receive and send mail through Google's mail server in a terminal environment. In this tutorial Finally, you'll find just a few steps you can use other e-mail service in the Alpine.
Indeed, there are many excellent GUI-based mail clients exists, such as Thunderbird, Evolution, or even a Web interface, so why are people using the command line to collect the mail client Gmail interested in what this does? The answer is simple. If you need to quickly handle things and want to avoid unnecessary waste of system resources; or if you are working on a streamlined installation without server console, it does not have the X server for graphical display of the installation; or is it in your X server on the desktop crashes, and you need to urgently send some messages before to solve this problem. In all the above cases, Alpine can come in handy and meet your needs at any time.
In addition to simple edit, send and receive text messages class information and other functions, Alpine can also encrypt and decrypt e-mail messages and digital signatures, as well as TLS (Note: Transport Layer Security, transport layer encryption) seamless integration.
Alpine installation on Linux
On the release of Red Hat-based, can be installed as Alpine image below. Note that on RHEL or CentOS, you need to first enable EPEL software repository.
# Yum install alpine
On Debian, Ubuntu or derivative thereof release, you can do this:
# Aptitude install alpine
After installation is complete, you can run the following command to launch the mail client:
When you first enable Alpine, it is created in the current user's home directory mail folder (~ / mail), and showing the main interface, as the following video as shown: YOUTUBU video - http: / /www.youtube.com/kuKiv3uze4U.
Its user interface has the following modules:
Please feel free to browse, be familiar with the operation of Alpine. At any time you can always come back to the command prompt and by knocking 'Q'. Please note that all of the characters associated with the operation below the interface has help.
Before we go further, we will create an Alpine default configuration file. To do this, turn off the Alpine, and then execute the following command at the command line:
# Alpine -conf> /etc/pine.conf
Alpine configured to use Gmail account
When you install the Alpine and spent at least a few minutes to become familiar with its interface and menu, the following is actually configure it to use an existing Gmail accounts of the time.
Before performing the following steps in Alpine, the first thing to remember through your Web mail interface, enable IMAP protocol in your Gmail settings. Once your Gmail account is enabled IMAP, perform the following steps to enable the function of information read Gmail in the Alpine.
First, start Alpine.
Press 'S' to set it up, press 'L' to select collectionLists option to define a different category folders to help you better organize your mail:
Press 'A' to create a new folder and fill in the necessary information:
Nickname: Fill in whatever name you want to write;
You can not fill blank Path and View.
Then press Ctrl + X and enter your Gmail password when prompted:
If everything goes well, as expected, there will be a new file in order to fill in your previous nickname named folders. You should be able to find your Gmail mailbox here:
To verify, you can compare Alpine displayed "Gmail Sent" mailbox and mailbox in the Web interface:
By default, every 150 seconds, it will automatically check for new messages or prompts, you can change this value in the file /etc/pine.conf while you can also modify many other settings. This configuration file has a detailed and clear comments. For example, to check for new mail interval set to 10 seconds, you need to set:
# The approximate number of seconds between checks for new mail
mail-check-interval = 10
Finally, we need to configure a SMTP server to send mail through Alpine. Back to the previously explained the Alpine setting interface, and then press the 'C' to set a Google SMTP server address, you need to edit the following SMTP Server (for sending mail) this line:
When you press 'E' to leave the setting screen, it will remind you to save your changes. Once you save your changes, you can immediately through Alpine to send mail! To this end, we came to the main menu Compose option, then begin operation from the command line of your Gmail bar.
to sum up
In this post, we discussed the line of the mail client to access Gmail in a terminal environment, how lightweight named the Alpine and powerful command. Alpine is released under the Apache Software License 2.0 agreement with the free software, the agreement with the GPL compatible. Alpine proud: it is not only the novice-friendly, but also for those who did experienced system administrator that it is powerful. I hope you finish reading this article, you realize how much my last assertion correct Yes.