applyfilter(8)
π applyfilter β the system manager's little helper
okay bestie, so this is applyfilter(8), a page straight out of the System Manager's Manual, and it's about applying your filter settings to the news spool. yeah. that. let's get into it π
β¨ NAME β¨
applyfilter β apply filter settings to news spool
like... it applies your filter settings. to the news spool. that's the whole vibe π
π¦ SYNOPSIS π¦
applyfilter [-v] ... newsgroup
πΈ DESCRIPTION πΈ
okay so first, context: Leafnode is a USENET package built for small sites β think few users, not a lot of disk space, but a huge number of groups desired. it's giving cozy-but-ambitious π«Ά
Applyfilter is the program that applies your filter settings to your newsspool. specifically? it's the one you run after changes that weren't in effect back when the articles got downloaded with fetchnews. yeah, the "oops I changed my rules after the fact" cleanup era π
so if you want to remove postings from your spool that match a certain filter pattern (peep FILES below, bestie), this is your girl. and here's the tea: if the headers of an article match any of the filtering rules, that article is being deleted from the newsgroup. not hidden. not archived. deleted. periodt π
also important, no cap: Applyfilter sets its real and effective uid to "news". iconic behavior, honestly π
π₯ OPTIONS π₯
-vβ Be verbose. spill the details, girl β¨newsgroupβ is the newsgroup you want to apply the filter to. just the one, babe π
π FILES π
A file specified in the filterfile option of /etc/news/leafnode/config contains the set of filtering rules that get applied to the newsspool. so that's where the lore lives π
Each rule must be on a separate line. Empty lines and comments are allowed and will be ignored β and the comment marker is a # which MUST be at the beginning of the line. like, beginning. not "somewhere in there". beginning. iykyk π
Each line contains a regular expression that will be compiled with the PCRE_MULTILINE option set (unless it's a comment line or an empty line, obviously). Every regular expression is applied to the whole message header β and folded message headers are unfolded before the match is attempted. and if any regular expression matches the header, the posting gets removed. bye bestie π
for example, the following set of rules will delete all crosspostings to alt.flame:
^Newsgroups:.*[, ]alt.flame$
^Newsgroups:.*[, ]alt.flame,
let's break that down, because it's lowkey elegant:
^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). see? ate. π₯
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. (ngl, regex lore goes deep. i can't be your only source, bestie π₯²)
not me having to say this part: some leafnode programs (such asfetchnews) feed the header line by line to the regexp (after unfolding), others (such asapplyfilter) 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 are trying to match multiple headers in the same regexp β this would work withapplyfilter, but not withfetchnews. so if your multi-header regex is acting brand new infetchnews, that's why π
π ENVIRONMENT π
LN_LOCK_TIMEOUTβ This variable is parsed as an unsigned integer value and determines how many secondsapplyfilterwill wait when trying to obtain the lock file from another leafnode program.0means to wait indefinitely. This variable takes precedence over the configuration file. so if you're sitting there like "why is it just waiting" β it's probably this π°οΈβ¨
π AUTHOR π
Copyright 1999 by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>.
Copyright 2002 β 2006 by Matthias Andree <matthias.andree@gmx.de>.
Leafnode was originally written by Arnt Gulbrandsen <agulbra@troll.no> and is copyright 1995 β 1996 Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47 22646949.
(legends. all of them. absolute main character energy π«Άπ)
β SEE ALSO β
pcre2pattern(3), leafnode(8), fetchnews(8), texpire(8).
go read those too, bestie, they're the extended universe πΈ
and that's the whole page! this lil number lives in leafnode 1.12.0, on the applyfilter(8) page, dated way back with the system manager's manual crew β mwah, go filter something responsibly πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: leafnode 1.12.0-2
- debian trixie: leafnode 1.12.0-4
- ubuntu noble: leafnode 1.12.0-2.1
- ubuntu questing: leafnode 1.12.0-4
- ubuntu resolute: leafnode 1.12.0-5
- ubuntu stonking: leafnode 1.12.0-5
- copyright 1999 by Cornelius Krasel
- Copyright 2001-2021 by Matthias Andree
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms