U-011A, USENET News: Using Kill Files

CONTENTS


INTRODUCTION

When reading news, a user may find that there are posts they do not care to read that are on a particular topic or from a particular author. This document is an introduction on how to create newsreader KILL files which allow the user to filter out unwanted posts in newsgroups. Examples are included of filtering subjects and authors for several newsreaders. Please note that not all newsreaders support KILL files. KILL files are especially useful if someone finds a particular user's posts offensive.

The following statements are from ITC's draft policy on dealing with network behavior complaints:

       ITC takes direct action when University systems are threatened or
       when   an   action  by  an  individual  within  the  University's
       electronic  community  is  otherwise  illegal.   ITC  also   acts
       directly  when  policies  specific to the use of ITC systems have
       been violated.  In instances when the action is not unambiguously
       illegal  or  when  the  policies  involved are University-wide in
       scope, ITC relies on University procedures  designed  to  address
       such  matters.  These procedures may include investigation by the
       University Police Department or review  by  University  deans  or
       other  University  specialists  to determine whether disciplinary
       action is appropriate.

If you are concerned about the behavior of another individual within the electronic University community, please send a detailed complaint to us, and we will evaluate it according to these guidelines. When we are not able to take action directly, we will forward it to the appropriate official for review and appropriate action. Because University disciplinary processes often are conducted under strict rules of confidentiality, ITC may be unable to provide continuing information about the progress or disposition of any such matter.

Please remember that in order for our process to begin, after receiving this information, you must send us a detailed complaint that may be forwarded to other officials.

Please send any network behavior complaints to usenet@virginia.edu.

Much of the following information came from the Frequently Asked Question (FAQ) file on KILL files, killfile-faq, available from USENET archives. For information on how to access this file, refer to the section ``Further Help''.


TYPES OF KILL FILES

There are two types of KILL files. A ``global'' KILL file is applied to all newsgroups. By default, the global KILL file resides in the ~userid/News directory. A ``local'' KILL file is applied to only one newsgroup. The local KILL file also resides in the ~userid/News directory, but the location is derived from the newsgroup name. For example, a local KILL file for the newsgroup alt.any.foo would be: ~userid/News/alt/any/foo/KILL where the global KILL file would be: ~userid/News/KILL

One may define a different location for KILL files by defining the environment variables, KILLGLOBAL and KILLLOCAL, in a .profile or .variables.ksh or .variables.csh file. One of the more common ways of defining these variables is:

K shellC shell
KILLOCAL="%p/Kill/%C"setenv KILLOCAL %p/Kill/%C
KILLGLOBAL="%p/Kill/Global"setenv KILLGLOBAL %p/Kill/Global

where %p expands to ~userid/News and %C expands to the name of the news- group and the global KILL file is now called ``Global''. To make your changes active, at the Unix prompt, type:

      . ./.profile   or   . ./.variables.ksh   or   . ./.variables.csh

or log out and log back in again.


CREATING AND EDITING KILL FILES

KILL files may be created or edited within the newsreader itself or by using an editor such as JOVE or Vi to edit the file directly.

trn or rn

To edit a local KILL file while reading a newsgroup, type K (upper- case k) while reading the news article. The first 20 characters of the subject will be added to the KILL file automatically. Typing Ctrl-k (holding down the Control key and pressing k) while reading an article will bring up the default editor and the local KILL file. To edit the global KILL file, type Ctrl-k at the newsgroup level. The syntax of the KILL file has the form:

     /pattern/modifiers:command

where ``pattern'' is a regular expression to select articles (case insen- sitive), ``modifiers'' is where to find the pattern in the post (subject, body, etc.), and ``command'' is what to do with the article after it is selected.

Some values and their meaning are shown in the following table:

ModifiersCommands
a all (entire article)m mark unread
h header of articlej mark read
f ``From'' field of header= show subject line
c make case sensitive 
H specific field of header 

Note: if no modifier is used, ``subject'' is assumed. The ``a'' modifier will substantially increase the KILL file processing time. Here are some examples:


   /test/:j                    kills posts with subject ``test'',``TeSt'', etc.
   /zyx9a@.*virginia.edu/f:j   kills posts from user zyx9a from any UVa machine
   /Hypercube/fc:j             kills posts from user alias ``Hypercube''
                               but doesn't kill posts from ``hypercube''
   /Alberta/HOrganization:j    kills posts from users that have ``Alberta''
                               in Organization field of header

For more information on KILL files for trn, see the manual pages. At the Unix prompt, type man trn.

upent

Upent does not support KILL files; however, when reading a news- group, you can place your cursor by a message and press c and the Return key. This will mark the selected subject and all responses as read. For more information, select ``(h) help'' within the newsreader.

pent (TERN newsreader)

Pent does not support KILL files; however, when reading a newsgroup, you can place your cursor by a message and press c and the Return key. This will mark the selected subject and all responses as read. For more information, select ``(h) help'' within the newsreader.

gnus (Emacs newsreader)

To edit a local KILL file while reading a newsgroup, type ESC-k (hold down the ESC key and type k). To edit a global KILL file while reading a newsgroup, type ESC-K (hold down the ESC key and type upper- case k). The syntax of the KILL file is shown below:


   (gnus-kill "From" "zyx9a")     selects messages with ``zyz9a'' in From header
   (gnus-kill "Subject" "test")   selects messages with ``test'' in  Subject
   (gnus-expunge "X")             removes all selected messages

For more information, see the on-line gnus manual within Emacs.


FURTHER HELP

For more help on KILL files, you may want to look at the file,


   ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/killfile-faq

For more information on using ftp, see the ITCWeb Hints documents on File Transfer.
WE REALLY WANT TO KNOW...
Have you found this publication useful? Are there ways we might improve or supplement it or other ITC publications? Did you find this document in Web or in hard copy? We really want your opinion. Send e-mail to:  newsdesk@virginia.edu

© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.