Gnus for Mail and Newsgroups
E-mail has become an integral part of our lives. Many of us spend several hours reading it each day. Adding Netnews newsgroups to the mix only increases the burden. Many tools are available to help us manage and pre-sort e-mail and Netnews. One of the best is Gnus (pronounced guh-NEWS), which is included in the Emacs editor utility.
For some people (such as myself) receiving several hundred e-mail messages a day is not uncommon. Some are from friends and family; some relate to work. Dozens each day are from the several mailing lists I subscribe to, mostly technical one. And let's not forget the daily frying pan full of spam.
Separating the wheat from the chaff is time consuming. More importantly it is mistake prone. What if I miss an important message from an editor or, even worse, my mother?
The arrival of Netnews in the early eighties was one of the first really useful innovations in the virtual world. The Netnews system allowed thousands, and now millions of people, to form communities of common interest. Whether your interest is antiques, Fortran programming or bizarre sexual practices, you can find a newsgroup. Today, the Netnews system is bigger and more comprehensive than ever. In fact, my server lists over 37,000 different newsgroups.
E-mail and newsgroups can provide us with the most important commodity of our age: information. This quantity of information is too overwhelming to take on without some advanced tools.
The Gnus mail and news reader provides a single powerful interface to all of the information available out there. As a news reader it is similar to many others, showing the groups and the number of new messages in each. Selecting a group shows the subject lines of the postings. Replies to a posting are shown directly beneath that posting. This is called threading, because it makes it easier to follow the threads of conversation in the cacophony of a newsgroup.
It is as a mail reader that Gnus really shines. It allows you to set up any number of mail groups. Incoming mail messages are automatically categorized according to the rules you've established. From that point onwards, mail is treated like Netnews, and each mail category contains a threaded list of the messages.
So if I get 100 e-mails, I will still be able to spot my Mom's: hers end up in the Family group. Spam, on the other hand (if I manage to detect it) will end up in my Junk group. Mailing list traffic ends up in a Mail group. It's as if the mailing list were a newsgroup.
All these groups are tremendously useful when it comes time to search for some old e-mail message. For instance, finding old messages from friends is easy because their e-mail is all grouped together. I also can keep weeks of mailing list traffic on my computer, and it never gets in the way.
Emacs is a freely available text editor originally written by Richard Stallman, geek extraordinaire and founder of the Free Software Foundation. Emacs is one of Stallman's first and best contributions to free software. A programmers' editor, it is a superb tool for producing and working with source code in any computer language.
Many UNIX systems come with Emacs already installed. To check, type Emacs on the command line. If Emacs starts up, note the version, which should be on the start-up screen. (Or select Show Emacs Version from the Help menu). If it is not at least version 20.something, you may want to ask your system administrator to install the latest version. It can be found at www.gnu.org/directory/All_GNU_Packages/emacs.html.
Once you have Emacs running on your system, you can start to configure it to read mail and news. To learn more about using Emacs, consult the Emacs Tutorial in the Help menu.
Gnus can be configured for just about every possible situation. Below I will describe the configuration for one particular situation: connecting a home machine to an ISP.
Configuring Netnews is simple. Find out the name of your news server, and then insert the following code into the .gnus file (if it doesn't exist, then create it; it's an ASCII file in your home directory.)
; Tell Gnus about the news server. (setq gnus-select-method '(nntp "newsserver.your-isp.com"))
The .gnus file is interpreted by Emacs as Lisp, a programming language intimately associated with Emacs. The semi-colon is a comment delimiter, indicating that everything following it on the line is a comment.
Also while you are editing the .gnus file, add the following lines, substituting your name and e-mail address for mine.
(setq user-full-name "Ed") (setq user-mail-address "firstname.lastname@example.org")
Once you've added that information, fire up your dial-up connection. Select Read Net News from the Tools menu, and Gnus will start. It will connect to your server and download the list of all available newsgroups (this process can take a few minutes.) Then it will subscribe you to one or two by default and display them.
Select Listing -> List Active File from the Groups menu, which tells Gnus to download and display the entire list of groups available. Search for groups of interest by using Ctrl-S (Control+s) and then typing the string you are searching for. Use the return key to end the search. To subscribe to the groups you've selected, put the cursor on the line with the newsgroup and select Toggle subscription from the Group menu.
If you already know the name of the group you want to join, select Subscribe -> Subscribe to a group from the Groups menu. You will be prompted for the name of the group.
Once you've subscribed to a few groups, select Listing -> List unread subscribed groups from the Groups menu. You will see all the groups you subscribed to, with the number of unread message in each.
To read the message headers of a specific group, put the cursor on the group line and use Select from the Group menu. You'll see the name of the poster and the subject line for all the messages in the group. Move the cursor around the Subject buffer, and press the space bar to view an article if it looks interesting.
You can take a look at the Article menu to see the wide varieties of ways in which you can respond to a message. But don't try and send any mail yet--we still have some setup to do before we're ready for that.
Special Reports: DevOps
Have projects in development that need help? Have a great development operation in place that can ALWAYS be better? Regardless of where you are in your DevOps process, Linux Journal can help!
With deep focus on Collaborative Development, Continuous Testing and Release & Deployment, we offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, advice & help from the experts, plus a host of other books, videos, podcasts and more. All free with a quick, one-time registration. Start browsing now...
- The Ubuntu Conspiracy
- A First Look at IBM's New Linux Servers
- Vigilante Malware
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Libreboot on an X60, Part I: the Setup
- Vagrant Simplified
- System Status as SMS Text Messages
- Bluetooth Hacks
- Dealing with Boundary Issues
- Non-Linux FOSS: Code Your Way To Victory!