File: applyfilter.8.in

package info (click to toggle)
leafnode 1.11.11-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,468 kB
  • sloc: ansic: 10,914; sh: 1,748; xml: 628; makefile: 291; perl: 84; sed: 4
file content (106 lines) | stat: -rw-r--r-- 3,672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.TH applyfilter 8 "@VERSION@" leafnode \" -*- nroff -*-
.\" DO NOT EDIT: @configure_input@
.\"
.\" Written and copyright 1999 by Cornelius Krasel
.\" <krasel@wpxx02.toxi.uni-wuerzburg.de>
.\" See file COPYING for restrictions on the use of this software.
.\"
.\" hilit19 is stupid: "
.SH NAME
applyfilter \- apply filter settings to news spool

.SH SYNOPSIS
.B applyfilter
[\fB\-v\fR] ... \fInewsgroup\fR

.SH DESCRIPTION
.B Leafnode
is a USENET package intended for small sites, where there are few
users and little disk space, but where a large number of groups is
desired.
.PP
.B Applyfilter
is the program to apply filter settings to your newsspool, particularly
after changes that were not in effect at the time the articles were
downloaded with \fBfetchnews. Applyfilter\fR is used
if you want to remove postings from your spool matching a certain filter
pattern (see FILES below). If the headers of an article match any of
the filtering rules, the article is being deleted from the newsgroup.
.PP
.B Applyfilter
sets its real and effective uid to "news".

.SH OPTIONS
.TP
.B \-v
Be verbose.
.TP
.I newsgroup
is the newsgroup you want to apply the filter to.

.SH FILES
.PP
A file specified in the
.I filterfile
option of
.B @msysconfdir@/config
contains the set of filtering rules that are applied to the newsspool.
Each rule must be on a separate line. Empty lines and comments (marked
by a # which
.B MUST
be at the beginning of the line) are allowed and will be ignored.
.PP
Each line contains a regular expression that will be compiled with the
PCRE_MULTILINE option set (unless it is a comment line or
an empty line). Every regular expression applied to the whole message
header (folded message headers are unfolded before the match is
attempted).  If any regular expression matches the header, the posting
gets removed. For example, the following set of rules will
delete all crosspostings to alt.flame.
.PP
^Newsgroups:.*[, ]alt.flame$
.br
^Newsgroups:.*[, ]alt.flame,
.PP
^Newsgroups: indicates that the pattern should only be applied to the
Newsgroups: header. After the header, an arbitrary number of characters
may follow, ending in either a comma or a space. After that, alt.flame
must be in the line, either at the end of the line (first entry) or in
the middle of the line, followed by other newsgroups (second entry).
.PP
Unfortunately, regular expressions are a complex matter and outside the
scope of this document. Please see the manual pages provided with the
PCRE library for details.
.PP
.B Note
that some leafnode programs (such as fetchnews) feed the header line by
line to the regexp (after unfolding), others (such as applyfilter) feed
the whole header in one large blob. This does not usually matter because
patterns are compiled in multiline mode, but will matter if you're
trying to match multiple headers in the same regexp \[en] this would work
with applyfilter, but not with fetchnews.

.SH ENVIRONMENT
.TP
.B
LN_LOCK_TIMEOUT
This variable is parsed as an unsigned integer value and determines how
many seconds applyfilter will wait when trying to obtain the lock file
from another leafnode program. 0 means to wait indefinitely. This
variable takes precedence over the configuration file.

.SH AUTHOR
.na
Copyright 1999 by Cornelius Krasel <krasel@wpxx02.toxi.uni\-wuerzburg.de>.
.br
Copyright 2002\~\[en]\~2006 by Matthias Andree <matthias.andree@gmx.de>.
.PP
Leafnode was originally written by Arnt Gulbrandsen <agulbra@troll.no>
and is copyright 1995\~\[en]\~1996 Troll Tech AS, Postboks 6133 Etterstad, 0602
Oslo, Norway, fax +47 22646949.

.SH SEE ALSO
.BR pcrepattern (3),
.BR leafnode (8),
.BR fetchnews (8),
.BR texpire (8).