Setting Up Expiration Times

Setting Up Expiration Times

Expiration times for news articles are set in the /etc/news/expire.ctl file. Existing entries in that file can be used as your default expiration times. With the remember entry, an article (even if it is expired) is remembered for 10 days. In this way, if the article is offered from another news feed, you can accept it. Here is the remember entry included in expire.ctl:


If you want the Expires: headers to work, leave the following entry in your expire.ctl file:


Some groups are good to keep around forever. These lines in expire.ctl keep articles around longer for all newsgroups that end in .answers and all that begin with news.announce:


Three different formats exist for entries in the expire.ctl file. The first format is represented by the /remember/ entry shown previously. The next is an entry for defining the expiration times associated with classes that are set in the storage.conf file. The other format contains five colon-separated fields that assign expiration to particular groups. Here are examples of the latter two formats:



The following are descriptions of each of the fields:

  • classnumber:???A number (0, 1, and so on) that corresponds with a class that is identified in the storage.conf file.

  • newsgroups:???The first field specifies which newsgroups are assigned to this expiration rule. As usual, you can use wildmat characters to match newsgroups. (Refer to the "Understanding Wildmat Characters" sidebar for details.)

  • modflag:???You can use the value in this field to further limit which groups are matched. The field should contain one of the following letters: M (moderated groups only), U (unmoderated groups only), A (all groups), X (removes the article). X results in every article that matches being deleted from every group that it is assigned to.

  • keep:???This field sets how many days the article should be kept. The field either contains a number or the word never. Articles are expired no sooner than the value set by keep.

  • default:???This field specifies the default value (in days). If an Expires: value is less than the default value, the default value is used. If the Expires: value is greater than the default, then the Expires: value is also honored.

  • purge:???This field identifies the outside boundary, in days, for how long articles should be kept. This boundary allows articles with Expires: headers to be accepted. If an article has an Expires: value that is longer than this purge value, the article is discarded at the time specified by purge.


Add your default newsgroups first. The expire rule that will be used is the last one that is matched.

The contents of this file are less valuable for the cnfs storage method, because articles are cycled out when the buffer is full. The cnfs storage method therefore makes it difficult to control precisely when articles are purged.

Part IV: Red Hat Linux Network and Server Setup