1 Automatic Article Checker
\r
2 v1.6 Copyright (C) June 2, 1999 by Heinrich Schramm
\r
3 mailto:heinrich@schramm.com
\r
5 converted to perl by Wilfried Klaebe <wk@orion.toppoint.de>
\r
6 (not really converted, more or less rewritten in perl)
\r
8 modified & enhanced (more or less rewritten ;-))
\r
9 by Thomas Hochstein <THochstein@gmx.de> since March/April 2000
\r
10 (c) artchk.pl (mod.) January 06, 2001 by Thomas Hochstein
\r
12 Version: 1.2.01 BETA
\r
14 _________ ATTENTION please! - This is a BETA version! _________
\r
16 ---------------------------------------------------------------------------
\r
17 This program is free software; you can redistribute it and/or modify it
\r
18 under the terms of the GNU General Public License as published by the Free
\r
19 Software Foundation; either version 2 of the License, or (at your option)
\r
21 This program is distributed in the hope that it will be useful, but
\r
22 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
23 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
25 ---------------------------------------------------------------------------
\r
30 * the "News::NNTPClient"-module from CPAN.
\r
31 * the "MIME::QuotedPrint"-module from CPAN.
\r
32 * the "MIME::Base64"-module from CPAN.
\r
33 * the "Net::DNS"-module from CPAN.
\r
34 * a (local) NNTP-server
\r
39 - artchk.pl # main program
\r
43 - sample.ini # .ini-file: server, port, user/password, groups, counter
\r
44 - sample.rc # .rc-file: customize headers / body of followups
\r
45 - domains # valid TLDs for MID-FQDNs
\r
47 to the same directory.
\r
49 The last three files must reside in the same directory as the first, or
\r
50 you have to specify the path to them when invoking artchk.pl
\r
52 You may specify different .ini-/.rc-files when invoking artchk.pl
\r
54 * Modify "sample.ini" to fit your needs and rename it to "artchk.pl.ini"
\r
55 (default) or anything you like.
\r
57 The .ini-file has to contain
\r
59 - the special word "checkgroups:" including the colon
\r
60 - a list of groups to check
\r
62 The parameters are written one on a line, "parametername = parameter".
\r
63 Allowed parameters are:
\r
64 - reader : the newsserver (and port) you read the postings from,
\r
66 This entry is necessary; you can drop the port.
\r
67 Default for port is 119.
\r
68 - reader_user : your username for authorization
\r
69 Default: (none) ---> no authorization
\r
70 - reader_pass : your password for authorization
\r
71 - poster : the newsserver (and port) you post to,
\r
73 Default: [none] ---> post to the server you read from
\r
74 You can drop the port. Default for port is 119.
\r
75 - reader_user : your username for authorization
\r
76 Default: [none] ---> no authorization
\r
77 - reader_pass : your password for authorization
\r
78 - trigger_check : a regular expression for the string that initiates
\r
79 a check when found in "Subject:".
\r
81 You should change "[header]" in the .rc-file accordingly!
\r
82 - trigger_ignore: a regular expression for the string that stops a check
\r
83 in auto-mode (see below) when found in "Subject:" or
\r
85 Default: (ignore)|(no[ ]*repl(y|(ies)))
\r
86 You should change "[header-auto]" in the .rc-file accordingly!
\r
87 - rcfile : the name of your .rc-file
\r
88 Default: [name of .ini-file]
\r
89 - killfile : the name of your .kill-file
\r
90 Default: [name of .ini-file]
\r
92 You can place comment lines in between; they may NOT contain a "=".
\r
94 The list of groups is in the following format:
\r
95 - the name of a group to check
\r
96 - a single space and a "y" or "n" to enable/disable auto-mode. Set it
\r
97 to "n" - artchk will only post followups to postings with
\r
98 trigger_check in the subject (but if trigger_check is
\r
99 found, it _will_ post a followup, even if trigger_ignore is
\r
101 to "y" - auto-mode; artchk will also post followups if it found
\r
102 something to correct as long as trigger_ignore is _not_
\r
103 found in the subject or the first line of the body and no
\r
104 killfile-expresion matches
\r
106 You may NOT place anything else after the magic word "checkgroups:".
\r
109 reader = server.pro.vider,119
\r
112 ---> We do not have another posting server.
\r
117 * Modify "sample.rc" to fit your needs and rename it to "artchk.pl.rc"
\r
118 (default) or anything you like.
\r
121 Edit at least the "From:" header configuration.
\r
122 Edit or delete the "Sender:" header.
\r
123 Edit or delete the "Path:" header.
\r
124 Edit or delete the "Reply-To:" header.
\r
125 Add any other headers you like,
\r
126 e.g. "X-Checkbot-Owner: My Name <my.name@do.main.invalid>"
\r
127 Do _NOT_ insert a "Newsgroups:" header!
\r
128 Do _NOT_ insert "Subject:", "Message-ID:", "References:" or "X-Artchk-Version:"!
\r
130 - Edit the [header]-/[header-auto]- and/or [footer] text section if
\r
131 you like. You should do that if you have changed the trigger_check/
\r
132 trigger_ignore-settings!
\r
134 - Later on, you can edit the other sections as you like. Please be
\r
135 sure to have a look at the source code in this case to understand
\r
136 how these sections are used.
\r
138 - Later on, you may add sections with special tips for certain
\r
139 newsclients. Those sections will be printed out immediately after
\r
140 the standard-reply. They have the form of [standard-nr] with nr being
\r
143 oe (Outlook Express, all versions)
\r
144 moz (Mozilla, all versions)
\r
145 agent (Forté Agent _and_ Free Agent, all versions)
\r
146 xnews (XNews, all versions)
\r
147 gnus (Gnus, all versions)
\r
148 macsoup (MacSoup, all versions)
\r
149 slrn (slrn, all versions)
\r
150 mpg (Microplanet's Gravity, all versions)
\r
155 - You may also delete sections - except for the following:
\r
156 [head] [header] [header-auto] [footer] [intro] [allok] [nr]
\r
157 The corresponding checks will then be skipped.
\r
159 * Attention! The sample files have CR/LF as linebreaks (DOS). On UNIX
\r
160 machines, you'll have to convert the files to use just LF as EOL, for
\r
161 example using "tr -d '\r' < sample.rc > sample.rc-unix".
\r
163 (3) HOW TO RUN artchk.pl
\r
165 * Just start it up. ;-)
\r
167 - "perl artchk.pl" should do fine, but artchk.pl will also accept parameters:
\r
168 perl artchk.pl -p<path> -n<name> -v[vvv] -l<logfile> -c<mid> --log
\r
172 Verbosity level from "0" to "4". See below.
\r
173 e.g. "perl artchk.pl -vvv".
\r
177 Path to your .ini-/.rc-/domains/.disabled/.kill/.log-file.
\r
178 e.g. "perl artchk.pl -pc:\programme\artchk\".
\r
181 Default: artchk.pl[.ini]
\r
182 Name for your .ini-file. This name also applies for the .disabled-file.
\r
184 e.g. "perl artchk.pl -nserver1".
\r
187 Default: (the name set via -n)[.log]
\r
188 Name for the logfile (if activated). See "--log" below.
\r
189 e.g. "perl artchk.pl -lartchk.log".
\r
192 Default: (there is none)
\r
193 Force check of a posting with "-c<message-id>".
\r
194 e.g. "perl artchk.pl -c<176r23r2erwfwe@do.main>"
\r
199 - artchk.pl will recognize the parameters regardless of their order.
\r
201 * artchk.pl will _not_ start if a file artchk.pl.disabled (or a file with
\r
202 any other, depending on the "-n"-parameter) exists in the path given
\r
205 * Normally, it will read the .rc- and .ini-file and do a little bit (!)
\r
206 of syntax-checking with them.
\r
208 * Then it'll connect to your server and check the first group. It'll get
\r
209 every new article from there, check it and -possibly- generate a
\r
210 followup and post it to that group. Then it'll do all other groups.
\r
211 It will delete and rewrite (!) the .ini-file to keep the article
\r
212 counter up to date.
\r
214 * It will check every posting unless it
\r
215 - is not in a group containing "test"
\r
216 - is a control message
\r
217 - already is a checkbot answers (detected by MID)
\r
218 - contains trigger_ignore in Keywords:
\r
219 - doesn't contain trigger_check in Subject:
\r
220 AND auto-mode is off
\r
222 If auto-mode is on, it will also check postings without
\r
223 trigger_check in Subject:, unless they
\r
225 - contain trigger_ignore in Subject: or first line of body
\r
226 - matcht the killfile (see below)
\r
228 * It will include an excerpt from the logfile if $trigger_check is
\r
229 followed by "verbose".
\r
231 * The display output of artchk.pl can be more or less verbose.
\r
236 0 - introduction/end + error messages
\r
237 1 - 0 + configuration and summaries
\r
238 2 - 1 + progress indicator
\r
239 3 - 2 + NNTP status replies from server
\r
240 4 - 3 + (debug-)output from check-routines
\r
244 * You can add a killfile to exclude certain postings from auto-mode.
\r
245 This file must have the name defined in your .ini-file and reside
\r
246 in the path given with "-p".
\r
247 It must have the following format:
\r
248 headerfield = regular expression # comment
\r
249 where headerfield is the name of any header field
\r
250 regular expression is any regular expression
\r
251 comment (anything from # to EOL) is a comment that is ignored
\r
253 If the regular expression matches the content of the header field,
\r
254 the posting is ignored in auto-mode. It is _not_ ignored if a check
\r
255 is requested via trigger-check in the Subject:.
\r
257 ---------------------------------------------------------------------------
\r
261 (1) This is a BETA version. Report all bugs and suggestions to
\r
262 <artchk@akallabeth.de>.
\r
264 (2) If you start running this bot in a non-local newsgroup, please send a
\r
265 short notice to <artchk@akallabeth.de>. That will make it possible to
\r
266 report bugs, problems and updates to you.
\r
268 (3) Please use this program with care and sense of responsibility!
\r
271 ---------------------------------------------------------------------------