Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

applyfilter(8) [debian man page]

applyfilter(8)						      System Manager's Manual						    applyfilter(8)

NAME
applyfilter - apply filter settings to news spool SYNOPSIS
applyfilter [-v] ... newsgroup DESCRIPTION
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. 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 fetchnews. Applyfilter is used if you want to remove postings from your spool matching a certain filter pat- tern (see FILES below). If the headers of an article match any of the filtering rules, the article is being deleted from the newsgroup. Applyfilter sets its real and effective uid to "news". OPTIONS
-v Be verbose. newsgroup is the newsgroup you want to apply the filter to. FILES
A file specified in the filterfile option of /etc/news/leafnode/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 MUST be at the beginning of the line) are allowed and will be ignored. 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 crosspost- ings to alt.flame. ^Newsgroups:.*[, ]alt.flame$ ^Newsgroups:.*[, ]alt.flame, ^Newsgroups: indicates that the pattern should only be applied to the Newsgroups: header. After the header, an arbitrary number of charac- ters 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). 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. Note that some leafnode programs (such as fetchnews) feed the header line by line to the regexp (after unfolding), others (such as apply- filter) 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 -- this would work with applyfilter, but not with fetchnews. ENVIRONMENT
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. 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-96 Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47 22646949. SEE ALSO
pcrepattern(3), leafnode(8), fetchnews(8), texpire(8). leafnode 1.11.8 applyfilter(8)

Check Out this Related Man Page

MAILPOST(8)						    InterNetNews Documentation						       MAILPOST(8)

NAME
mailpost - Feed an e-mail message into a newsgroup SYNOPSIS
mailpost [-hn] [-a addr] [-b database] [-c wait-time] [-d distribution] [-f addr] [-m mailing-list] [-o output-command] [-p port] [-r addr] [-x header[:header...]] newsgroups DESCRIPTION
The mailpost program reads a properly formatted e-mail message from stdin and feeds it to inews for posting to a news server. newsgroups is a whitespace-separated list of group names to which to post the article (at least one newsgroup must be specified). Before feeding the article to inews, it checks that the article has not been seen before, and it changes some headers (cleans up some address headers, removes X-Trace: and X-Complaints-To:, and puts "X-" in front of unknown headers). If the article has been seen before (mailpost records the Message-ID of each article it handles), then the article will be dropped with a non-zero error status. Other errors will cause the article to be mailed to the newsmaster (selected at configure time and defaulting to "usenet"). Normally, mailpost is run by sendmail(8) via an alias entry: local-mail-wreck-bikes: "|<pathbin in inn.conf>/mailpost -b /var/tmp -d local local.mail.rec.bicycles.racing" Instead of /var/tmp, the mail spool directory can be specified, or any other directory where the mailpost process has write access. OPTIONS
-a addr If the -a flag is used, the value given is added to the article as an Approved: header. -b database If the -b flag is used, then it defines the location of the database used to store the Message-IDs of articles sent on. This is to prevent articles looping around if a news-to-mail gateway sends them back here. This option may be required if the mailpost process does not have write access to the news temporary directory. The default value is pathtmp as set in inn.conf. -c wait-time The -c flag indicates a length of time to sleep before posting. If duplicate messages are received in this interval (by any instance of mailpost using the same database), the article is only posted once, but with Newsgroups: header modified to crosspost the article to all indicated groups. The units for wait-time are seconds; a reasonable value may be anywhere from tens to hundreds of seconds, or even higher, depending on how long mail can be delayed on its way to your system. -d distribution If the -d flag is used, the value given is added to the article as a Distribution: header. -f addr The -f flag is a synonym for the -r flag. -h Print usage information and exit. -m mailing-list If the -m flag is used, the value given is added to the article in a Mailing-List: header, if such a header doesn't already exist. -n If the -n flag is used, neither an article is posted nor a mail is sent in case an error occurs. Everything is written to the standard output. -o output-command Specifies the program to which the resulting article processed by mailpost should be sent. For debugging purpose, "-o cat" can be used. The default value is "inews -S -h". -p port Specifies the port on which nnrpd is listening, used for article posting. If given, -p is passed along to inews. -r addr A heuristic is used to determine a reasonable value for the Path: header. The -r flag indicates what to use if no other value can be determined. -x header[:header...] A colon-separated list of additional headers which should be treated as known headers; these headers will be passed through to inews without having "X-" prepended. Known headers are: Approved Content-* Date Distribution From Mailing-List Message-ID MIME-* References Return-Path Sender Subject FILES
pathbin/mailpost The Perl script itself used to feed an e-mail message to a newsgroup. pathtmp/mailpost-msgid.dir and pathtmp/mailpost-msgid.pag The default database files which record previously seen Message-IDs. HISTORY
Written by Paul Vixie long ago and then hacked up by James Brister for INN integration. $Id: mailpost.in 9409 2012-05-28 18:43:20Z iulius $ SEE ALSO
active(5), inews(1), inn.conf(5), nnrpd(8), uwildmat(3). INN 2.5.3 2012-06-15 MAILPOST(8)
Man Page