expire(8)

NAME
expire - remove old news articles

SYNOPSIS
expire [-d] [-n groups] [-a [groups]] [-e days] [-v level]
       [-f user@system] [-p] [-t archiver]

DESCRIPTION

Expire is the program that removes old news articles from the spool directory to prevent your harddisk from filling up with out of date information. When it is done, it re-writes the history file(s) to filter out the deleted articles. For small sites, it would be recommended to run this program every night from cron(1M).

Expire has the following set of options:

-d  Turn on debugging. This sets the verbose level to the highest possibles, and causes expire to neither delete articles nor update the active file.

-v  This flag takes an integer as an argument, which specifies the verbose rate of expire. At rate 0, it will be completely silent and at rate 3, it will tell you everything it is doing. However be careful with high rates as the log files tend to fill up very quickly.

-n  Must be followed with a list of groups, separated with comma's or white space. The syntax of this list is somewhat compatible with that of the sys file. For example, to expire only articles from newsgroups mugnet.*, but not from mugnet.talk, use:

    expire -n mugnet.all,!mugnet.talk

-a  Specify the newsgroups from which to archive articles. The archived articles go to /usr/spool/oldnews/*, if this directory exists. Normally articles will just be copied there but with the -t flag, it is possible to specify an archive program (like tar, lharc etc).

-t  Specify an archiver to use with the -a option. For example, the syntax with lharc would be:

    -a /usr/ucb/lharc a %f %a

    When expire executes this command, %f will be expanded to the filename of the archive (which is "archive") and %a will be expanded to the filename of the article to archive. If your archiver can handle it, it is also possible to include "%s", which expands to the subject line of the article. If the archiver needs flags preceded with a minus sign ('-'), use a double minus sign. (As in zoo --add %f %a). It is needed to specify the full path name to the command, and shell scripts cannot be executed. To work around this you can always use:

    -a /bin/sh .......

    but this is much slower as a shell has to be called every time.

-e  The -e flag needs an integer as argument, which specifies the age (in days) of an article it has to reach before it is deleted. The default value is 15 days. Large values can be useful so expire does not delete any articles but only updates the "active" file.

-f  The -f flag takes an username as an argument. Every article with a From: line matching this argument exactly will be deleted.

-p  Normally, expire calculates the age of an article according to the age of the file the article is contained in. With the -p flag, expire will look at the dates from the Date: field of the article.

BUGS
When expire is out of memory, it might not have enough space to open the "errlog" file. This can mostly be seen in /usr/adm/cronlog. This can occasionally happen with abnormal big "active" files. Under MINIX try to "chmem" expire as big as possible. For normal applications, 32000 is enough.

FILES
/usr/lib/news/active,
/usr/spool/news/*,
/usr/spool/oldnews/*,
/usr/lib/news/history
(these files may be located in /conf/... and /var/...)

AUTHORS
Miquel van Smoorenburg, miquels@drinkel.ow.org
Fred N. van Kempen, waltje@Infomagic.COM
Udo Munk, udo@umunk.GUN.de (Coherent)