Gnus for Mail and Newsgroups

A tutorial for using and configuring Gnus in Emacs that can make your inbox a cleaner and much more efficient place.
Automatic Deletion of Messages

Gnus does not ever delete e-mail messages unless you instruct it to. To delete a message use Backend -> Delete from the Article menu.

This way of individually deleting messages, however, can get cumbersome. So this is a good time to learn about marks. Marks allow multiple selection. In the Summary buffer you can mark a message using the # key. A # appears to the left of the message header to indicate that this message has been marked.

Once you have marked a bunch of messages, any command you try will apply to all of them. For example, mark some messages with the # in the article buffer, and then select Backend -> Delete article. You will be asked to confirm that you want all of these e-mails deleted forever.

Some groups should be deleted automatically. Your spam group is a good candidate. You want to keep messages in there for a little while (so that you can make sure occasionally that nothing important ended up there), but you don't want hundreds of messages about Viagra and pyramid schemes to be cluttering up your hard drive. Gnus allows you to specify that some groups should be automatically deleted. Insert the following into your .gnus file:

(setq gnus-auto-expirable-newsgroups
      "mail.spam\\|mail.cygwin")

This will cause articles to be expired in the spam group and the Cygwin mailing list group. Expired means that about a week after you get them, they'll be deleted. Put as many mail groups as you like in this line, separating them with \\|.

Rating and Other Advanced Features

Gnus also can help you decide which messages to read first. For example, if one author's news postings are always worth reading, you can ask Gnus to rate those articles higher than others so they are brought to your attention. This process is known as scoring. If you want to see more of something, increase its score. If you want to see less of it, lower the score.

It's helpful to score your own posts highly; that way you can easily find them. First select Post an article from the Post menu. If you do this while reading a group, you automatically will be posting to that group. If you are not reading a group, you must enter the name of a group at the top of your post.

When you've finished typing a message, select Send message from the Message menu. Give it a few minutes, then refresh Gnus by selecting Check for new news from the Misc menu. To set up scoring, find your posting. While reading it, select Increase score from the Score menu, which present you with a number of choices. Use the ? to see your choices. Then press the A key, which tells Gnus you are adjusting the score for the author. You are then offered another set of choices, select S. For your final choice, select P; your name and e-mail should appear. Now press the return key. You have just increased your score, and your posts will appear in bold face type.

Using Topics

So many groups, so little space on the screen! There is a way to create groups of groups, which can help organize your mail and news even further. These groups of groups are called topics. Select Toggle topics from the Misc menu. Put the cursor at the top of the screen and select Topics -> Create from the Topics menu. Enter the name of a topic, and a new (empty) topic will be created. To move a group into that topic, put the cursor on the group name, and select Groups -> Move from the Topic menu.

Play with these groups and groups of groups for a while; you'll find them a helpful way to further organize your mail and news.

Conclusion

Gnus has so many options and features that it can seem quite intimidating. The reason to use Gnus is it is a news and mail client you will never outgrow. Using group selection methods, you have apply sophisticated sorting to incoming e-mail. With scoring, Gnus can become an intelligent partner in your on-line existence.

Resources

A wealth of information about Gnus and Emacs is available for free on the Web.

The Emacs Frequently Asked Questions List (FAQ).

Windows users should also look at the GNU Emacs FAQ for Windows 95/98/ME/NT/XP and 2000.

The Emacs manual is included in the Emacs distribution and can be found in Emacs by typing M-x info. If you want it in HTML, ASCII or some other formats, look here.

Once you get Gnus up and running, you can post questions to the gnu.emacs.gnus newsgroup.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Gnus for Mail and Newsgroups - HTML?

Anonymous's picture

Can gnus now display mail with html in it? That one problem I found with using it in the past....

Re: Gnus for Mail and Newsgroups

dsaklad's picture

How would you make it easier for nonprogrammers to set up gnus email ?... What's available on the web currently still requires knowledge that once it's set up that knowledge isn't critical to operating gnus email.

For example, I've set up gnus newsgroups. Now, how do I get gnus email set up?... Step by step instructive comments are needed that can be followed by nonprogrammers unfamiliar with the jargon.

oo__ dsaklad@gnu.org

See also
[ http://groups.google.com/groups?as_q=saklad&safe=off&ie=ISO-8859-1&as_ugroup=gnu.emacs.gnus&lr=&as_scoring=d&hl=en ]

How to make gnus email setup automatic or nearly automatic.

dsaklad's picture

How would you make it easier for nonprogrammers to set up gnus email ?... What's available on the web currently still requires knowledge that once it's set up that knowledge isn't critical to operating gnus email.

For example, I've set up gnus newsgroups. Now, how do I get gnus email set up?... Step by step instructive comments are needed that can be followed by nonprogrammers unfamiliar with the jargon.

oo__ dsaklad@gnu.org

See also
[ http://groups.google.com/groups?as_q=saklad&safe=off&ie=ISO-8859-1&as_ugroup=gnu.emacs.gnus&lr=&as_scoring=d&hl=en ]

Re: Gnus for Mail and Newsgroups

Anonymous's picture

Oops...I posted a reply instead of a new comment. Duh! So...How do you handle spam messages that are uuencoded? We are noticing that the spammers have caught on to the word and phrase based delivery rules which we use to eliminate spam. To thwart the delivery rules, they uuencode their messages. Is there a way to first decode the message then pass it to their delivery rules

Re: Gnus for Mail and Newsgroups

Anonymous's picture

Minor correction about regular expressions: A period (.) means "any character" not "any number of the following character." A star (*) means "any number of the _previous_ character".

Re: Gnus for Mail and Newsgroups

Anonymous's picture

How do you handle spam messages that are uuencoded? We are noticing that the spammers have caught on to the word and phrase based delivery rules which we use to eliminate spam. To thwart the delivery rules, they uuencode their messages. Is there a way to first decode the message then pass it to their delivery rules?

Re: Gnus for Mail and Newsgroups -- great article!

Anonymous's picture

I've been using Gnus for about a year. I thought this article was a good general overview of Gnus. Thanks!

Re: Gnus for Mail and Newsgroups -- great article!

Anonymous's picture

I've been using Gnus since 95/96, and have lately tried to get away from it. You know what? It's impossible! I've yet not found any other mail/news client that gives me the same flexibility as Gnus have. Sure, most of the other are better looking, but they dont have the same feature richness as Gnus.

Re: Gnus for Mail and Newsgroups -- great article!

Anonymous's picture

Sylpheed is catching up though (for those that like a GUI MUA)

Re: Gnus for Mail and Newsgroups -- great article!

Anonymous's picture

Can sylpheed do article expiry as this is a major selling pint for gnus for people subscribed to big lists

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState