1SUCK(1)                     General Commands Manual                    SUCK(1)
2
3
4

NAME

6       suck  - Pull a small newsfeed from an NNTP server, avoiding the NEWNEWS
7       command.
8

SYNOPSIS

10       suck [ hostname ] [ @filename ] [ -V ] [ -K ] [ -L[SL] ] [ filename ] [
11       -H  ]  [  -HF  filename  ]  [  -d[tmd] dirname ] [ -s | -S filename ] [
12       -e | -E filename ] [ -a ] [ -m ] [ -b[irlf] batchfile ] [ -r filesize ]
13       [  -p  extension ] [ -U userid ] [ -P password ] [ -Q ] [ -c ] [ -M ] [
14       -N port_number ] [  -W  pause_time  pause_nr_msgs  ]  [  -w  pause_time
15       pause_nr_msgs  ] [ -l phrase_file ] [ -D ] [ -R ] [ -q ] [ -C count ] [
16       -k ] [ -A ] [ -AL activefile ] [ -hl localhost ] [ -bp ] [ -T timeout ]
17       [  -n  ]  [  -u ] [ -z ] [ -x ] [ -B ] [ -O ] [ -G ] [ -X ] [ -f ] [ -y
18       post_filter ] [ -F ] [ -g ] [ -i number_to_read ] [ -Z ] [ -rc ] [  -lr
19       ] [ -sg ] [ -ssl ] [ -SSL ]
20
21       Options valid in all modes tname
22
23       The  hostname  may  optionally  include  the  port  number, in the form
24       Host:Port.Ifthisoptionisused,anyportnumberspecified via the  -N  option
25       is ignored.
26
27       @filename
28
29       This option tells suck to read other options from a file in addition to
30       the commandline.
31
32       -a
33
34       This option forces suck to always batch  up  any  downloaded  articles,
35       even  if  suck  aborts  for any reason.  Without this option, suck will
36       only batch up articles if it finishes successfully or is cancelled by a
37       signal (see below).
38
39       -A
40
41       This  option  tells  suck to scan the localhost (specified with the -hl
42       option) and use its active file to build  and  update  the  sucknewsrc.
43       If you add a group to your local server, suck will add it to sucknewsrc
44       and download articles.  Or, if you  delete  a  group  from  your  local
45       server,  it will be deleted from sucknewsrc.  If posting is not allowed
46       to a particular group, then the line in sucknewsrc  is  just  commented
47       out.   With this option, you should never have to edit your sucknewsrc.
48       In case you have newsgroups (like control and junk) that you don't want
49       downloaded, you can put these newsgroups in a file "active-ignore", one
50       per line, and suck will ignore  these  newsgroups  when  it  scans  the
51       localhost.   If  your  system  supports  regex(),  you  may use regular
52       expressions in the active-ignore file  to  skip  multiple  groups,  eg:
53       fred.*.   If  you  use the -p (postfix) option, suck will check for the
54       existence of an active-ignore file with the postfix.  If  that  doesn't
55       exist,  then  suck will check for the existence of the file without the
56       postfix.
57
58       NOTE: If the localhost is on a non-standard port, the port  number  may
59       be specified as part of the hostname, in the form Host:Port.
60
61       NOTE:  If  you use regular expressions, suck will silently add a "^" to
62       the beginning of the group name, and a "$" to the end of the group name
63       if they aren't already present, so that if you have "comp.os.linux", it
64       won't match  "comp.os.linux.answers"  or  if  you  have  "alt.test"  it
65       doesn't match "comp.alt.test".
66
67       -AL activefile
68
69       This  option  is identical to the -A option, except it reads the active
70       file from the local file specified  instead  of  reading  it  from  the
71       localhost.   All the caveats from the -A option apply to this option as
72       well.  If both options are used on the command line, suck  first  tries
73       to use the -A option, then if that fails it uses this option.
74
75       -B
76
77       This  option  tells  suck  to  attempt  to batch up any articles in its
78       directory BEFORE starting to download messages.  This can be useful  if
79       you  have  a problem with the previous download.  This option will only
80       work if you specify a batch option (see below).   If there are no  mes‐
81       sages  to  batch up, some of the batch options may produce warning mes‐
82       sages.  They may be safely ignored.  Also, if the batch files exist  at
83       the  end  of  the run, in inn-batch mode, it will be overwritten, since
84       the new batch file will contain all messages.  In rnews  mode,  if  the
85       batch file exists, it will abort and not batch up any messages.
86
87       -c
88
89       If  this  option  is  specified, suck will clean up after itself.  This
90       includes:
91              1. Moving sucknewsrc to sucknewsrc.old
92              2. Moving suck.newrc to sucknewsrc
93              3. rm suck.sorted and suckothermsgs.
94
95       -C count
96
97       This option tells suck to drop the connection and reopen it every count
98       number of articles.  This is designed to battle INN's LIKE_PULLERS=DONT
99       option, that some folks compile in. With LIKE_PULLERS=DONT,  after  100
100       messages  INN  will  pause between every message, dramatically reducing
101       your download speed. I don't recommend the use of this, but if you have
102       no other choice....
103
104       -dd dirname
105
106       -dm dirname
107
108       -dt dirname
109
110       Specify the location of the various files used by suck.
111
112       -dd  dirname  =  directory of data files used by suck (sucknewsrc suck‐
113       killfile suckothermsgs active-ignore sucknodownload)
114
115       -dm dirname = directory for storage of articles  created  in  Multifile
116       mode  or batch mode.  DO NOT make this the same as the directories used
117       for the -dt or -d options, or you  will  lose  all  your  configuration
118       files.
119
120       -dt  dirname  =  directory  of  temp files created by suck (suck.newrc,
121       suck.sort, suck.restart, suck.killlog, suck.post).
122
123       -D
124
125       This  option  tells  suck  to  log  various   debugging   messages   to
126       "debug.suck", primarily for use by the maintainer.
127
128       -e | -E filename
129
130       These  options  will  send  all  error  messages (normally displayed on
131       stderr), to an alternate file.  The lower case version, -e,  will  send
132       the error messages to the compiled-in default defined in suck_config.h.
133       The default is suck.errlog.  The upper case version, -E,  requires  the
134       filename parameter.  All error messages will then be sent to this file.
135
136       -f
137
138       This  option  tells  suck to reconnect after deduping, and before down‐
139       loading the articles.  This is in case long dedupe times cause timeouts
140       on the remote end.
141
142       -F
143
144       This  option  tells  suck  to  reconnect after reading the local active
145       file, and before downloading the Msg-IDs.  This is in case of  a  large
146       active file, which causes timeouts on the remote end.
147
148       -g
149
150       This  option  causes  suck to only download the headers of any selected
151       articles.  As a result of this, any batching of  articles  is  skipped.
152       This option does work with killfiles, however, killfile options such as
153       BODYSIZE> will be ignored, since the body of the article will never  be
154       downloaded.
155
156       -G
157
158       This  option  causes  suck  to display the message count and BPS status
159       lines in a slightly different format, more suitable for use by a filter
160       program (such as a GUI).
161
162       -H
163
164       This option will cause suck to bypass the history check.
165
166       -HF history_file_name
167
168       This  option  tells suck the location of the history file.  The default
169       is at /usr/news/db/history.
170
171       -hl localhost
172
173       This option specifies the localhost name.  This option is required with
174       both the -A and the -bp option.
175
176       -i number_to_read
177
178       This  option  tells  suck the number of articles to download if you are
179       using the -A or -AL option, and a new group is added.   The default  is
180       defined  in  suck_config.h  (ACTIVE_DEFAULT_LASTREAD,  currently -100).
181       NOTE:  This must be a negative number (eg -100, -50), or 0, to download
182       all articles currently available in the group.
183
184       -k
185
186       This  option tells suck to NOT attach the postfix from the -p option to
187       the names of the killfiles, both the  master  killfile  and  any  group
188       files.   This  allows you to maintain one set of killfiles for multiple
189       servers.
190
191       -K
192
193       This option will cause suck to bypass checking the killfile(s).
194
195       -l phrase_file
196
197       This option tells suck to load in an alternate phrase file, instead  of
198       using  the  built-in  messages.   This  allows  you  to have suck print
199       phrases in another language, or to allow you to customize the  messages
200       without re-building suck.  See below.
201
202       -lr
203
204       This  option, is used in conjunction with the highest article option in
205       the sucknewsrc, to download the oldest articles, vice the newest  arti‐
206       cles. See that section for more details.
207
208       -L
209
210       This option tells suck to NOT log killed articles to suck.killlog.
211
212       -LF filename
213
214       This  option allows you to override the built-in default of "suck.kill‐
215       log" for the file which contains the log entries for killed articles.
216
217       -LL
218
219       This option tells suck to create long log entries for each killed arti‐
220       cle.   The  long  entry contains the short log entry and the header for
221       the killed message.
222
223       -LS
224
225       This option tells suck to create short  log  entries  for  each  killed
226       article.   The  short  entry contains which group and which pattern was
227       matched, as well as the MsgID of the killed article.
228
229       -M
230
231       This option tells suck to send the "mode reader" command to the  remote
232       server.   If  you  get an invalid command message immediately after the
233       welcome announcement, then try this option.
234
235       -n
236
237       This option tells suck to use the article  number  vice  the  MsgId  to
238       retrieve  the  articles.   This  option is supposedly less harsh on the
239       remote server.  It can also eliminate problems if  your  ISP  ages  off
240       articles  quickly  and  you  frequently get "article not found" errors.
241       Also, if your ISP uses DNEWS, you might need this  option  so  that  it
242       knows you're reading articles in a group.
243
244       -N port_number
245
246       This  option  tells suck to use an alternate NNRP port number when con‐
247       necting to the host, instead of the default, 119.
248
249       -O
250
251       This option tells suck to skip the first article upon restart.  This is
252       used  whenever there is a problem with an article on the remote server.
253       For some reasons, some NNTP servers, when they have a  problem  with  a
254       particular  article, they time out.  Yet, when you restart, you're back
255       on the same article, and you time out again.  This option tells suck to
256       skip  the  first  article upon restart, so that you can get the rest of
257       the articles.
258
259       -p extension
260
261       This extension is added to all files so that you can have multiple site
262       feeds.   For  example,  if  you  specify -p .dummy, then suck looks for
263       sucknewsrc.dummy, suckkillfile.dummy, etc, and creates its  temp  files
264       with  the  same  extension.  This will allow you to keep multiple suck‐
265       newsrc files, one for each site.
266
267       -q
268
269       This option tells suck to not display the BPS and  article  count  mes‐
270       sages  during  download.   Handy  when running suck unattended, such as
271       from a crontab.
272
273       -R
274
275       This option tells suck to skip a rescan of the remote newserver upon  a
276       restart.   The  default is to rescan the newserver for any new articles
277       whenever suck runs, including restarts.
278
279       -rc
280
281       This option tells suck to change its behavior when  the  remote  server
282       resets  its  article  counters.    The default behavior is to reset the
283       lastread in sucknewsrc to the current high article counter.  With  this
284       option, suck resets the lastread in sucknewsrc to the current low arti‐
285       cle counter, causing it to suck all articles in the  group,  and  using
286       the historydb routines to dedupe existing articles.
287
288       -s | -S filename
289
290       These options will send all status messages (normally displayed on std‐
291       out), to an alternate file.  The lower case version, -s, will send  the
292       status  messages  to  the compiled-in default defined in suck_config.h.
293       The default is /dev/null, so no status messages will be displayed.  The
294       upper  case  version,  -S, requires the filename parameter.  All status
295       messages will then be sent to this file.
296
297       -sg
298
299       This option tells suck to add the name of the current group being down‐
300       loaded,  if  known,  to the BPS display.   Typically the only time suck
301       doesn't know the group name is if an  article  is  downloaded  via  the
302       suckothermsgs file.
303
304       -ssl
305
306       This option tells suck to use SSL to talk to the remote server, if suck
307       was compiled with SSL support.
308
309       -SSL
310
311       This option tells suck to use SSL to talk to the local server, if  suck
312       was compiled with SSL support.
313
314       -T timeout
315
316       This  option  overrides the compiled-in TIMEOUT value. This is how long
317       suck waits for data from the remote host before timing out  and  abort‐
318       ing.  The timeout value is in seconds.
319
320       -u
321
322       This  option  tells  suck to send the AUTHINFO USER command immediately
323       upon connect to the remote server, rather than wait for a  request  for
324       authorization.  You must supply the -U and -P options when you use this
325       option.
326
327       -U userid
328
329       -P password
330
331       These two options let you specify a userid and password, if  your  NNTP
332       server requires them.
333
334       -Q
335
336       This  option tells suck to get the userid and password for NNTP authen‐
337       tication from the environment  variables  "NNTP_USER"  and  "NNTP_PASS"
338       vice the -U or -P password.  This prevents a potential security problem
339       where someone doing a ps command can see your userid and password.
340
341       -V
342
343       This option will cause suck to print out the version  number  and  then
344       exit.
345
346       -w pause_timer pause_nr_msgs
347
348       This  option  allows  you to slow down suck while pulling articles.  If
349       you send suck a predefined signal (default SIGUSR1, see suck_config.h),
350       suck  will  swap  the  default  pause  options  (if specified by the -W
351       option), with the values from this option.  For example, you  run  suck
352       with  -w  2 2, and you send suck a SIGUSR1 (using kill), suck will then
353       pause 2 seconds between every other message,  allowing  the  server  to
354       "catch  its  breath."  If you send suck another SIGUSR1, then suck will
355       put back the default pause options.  If no pause options were specified
356       on  the  command  line  (you  omitted -W), then suck will return to the
357       default full speed pull.
358
359       -W pause_time pause_nr_msgs
360
361       This option tells suck to pause between the download of articles.   You
362       need  to specify how long to pause (in seconds), and how often to pause
363       (every X nr of articles). Ex: -W 10 100 would cause suck to  pause  for
364       10  seconds  every  100 articles.  Why would you want to do this?  Suck
365       can cause heavy loads on a remote server, and  this  pause  allows  the
366       server to "catch its breath."
367
368       -x
369
370       This  option  tells  suck to not check the Message-IDs for the ending >
371       character.  This option is for brain dead NNTP  servers  that  truncate
372       the XHDR information at 72 characters.
373
374       -X
375
376       This option tells suck to bypass the XOVER killfiles.
377
378       -y post_filter
379
380       This option is only valid when using any of batch modes.  It allows you
381       to edit any or all of the articles downloaded  before  posting  to  the
382       local host.   See below for more details.
383
384       -z
385
386       This  option tells suck to bypass the normal deduping process.  This is
387       primarily for slow machines where the deduping takes  longer  than  the
388       download of messages would.  Not recommended.
389
390       -Z
391
392       This  option  tells suck to use the XOVER command vice the XHDR command
393       to retrieve the information needed to download articles.  Use  this  if
394       your remote news server doesn't support the XHDR command.
395
396

LONG OPTION EQUIVALENTS

398              -a  --always_batch
399              -bi --batch-inn
400              -br --batch_rnews
401              -bl --batch_lmove
402              -bf --batch_innfeed
403              -bp --batch_post
404              -c  --cleanup
405              -dt --dir_temp
406              -dd --dir_data
407              -dm --dir_msgs
408              -e  --def_error_log
409              -f  --reconnect_dedupe
410              -g  --header_only
411              -h  --host
412              -hl --localhost
413              -k  --kill_no_postfix
414              -l  --language_file
415              -lr --low_read
416              -m  --multifile
417              -n  --number_mode
418              -p  --postfix
419              -q  --quiet
420              -r  --rnews_size
421              -rc --resetcounter
422              -s  --def_status_log
423              -sg --show_group
424              -ssl --use_ssl
425              -w  --wait_signal
426              -x  --no_chk_msgid
427              -y  --post_filter
428              -z  --no_dedupe
429              -A  --active
430              -AL --read_active
431              -B   --pre-batch
432              -C  --reconnect
433              -D  --debug
434              -E  --error_log
435              -G  --use_gui
436              -H  --no_history
437              -HF --history_file
438              -K  --killfile
439              -L  --kill_log_none
440              -LS --kill_log_short
441              -LL --kill_log_long
442              -M  --mode_reader
443              -N  --portnr
444              -O --skip_on_restart
445              -P  --password
446              -Q  --password_env
447              -R  --no_rescan
448              -S  --status_log
449              -SSL --local_use_ssl
450                     -T  --timeout
451                     -U  --userid
452                     -V  --version
453                     -W  --wait
454                     -X  --no_xover
455                     -Z --use_xover
456
457

DESCRIPTION

MODE 1 - stdout mode

460              %suck
461              %suck myhost.com
462
463       Suck  grabs  news from an NNTP server and sends the articles to stdout.
464       Suck accepts as argument the name of an NNTP server  or  if  you  don't
465       give  an argument it will take the environment variable NNTPSERVER. You
466       can redirect the articles to a file or compress them on  the  fly  like
467       "suck  server.domain  |  gzip -9 > output.gz".  Now it's up to you what
468       you do with the articles.  Maybe you have the output  already  on  your
469       local  machine because you used a slip line or you still have to trans‐
470       fer the output to your local machine.
471

MODE 2 - Multifile mode

473              %suck -m
474              %suck myhost.com -m
475
476       Suck grabs news from an NNTP server and stores each article in a  sepa‐
477       rate file.  They are stored in the directory specified in suck_config.h
478       or by the -dm command line option.
479

MODE 3 - Batch mode

481              %suck myhost.com -b[irlf] batchfile
482              or %suck myhost.com -bp -hl localhost
483              or %suck myhost.com -bP NR -hl localhost
484              %suck myhost.com -b[irlf] batchfile
485
486       Suck will grab news articles from an NNTP server and  store  them  into
487       files,  one  for  each  article  (Multifile mode).  The location of the
488       files is based on the defines in suck_config.h  and  the  command  line
489       -dm.  Once suck is done downloading the articles, it will build a batch
490       file which can be processed by either innxmit or rnews, or it will call
491       lmove to put the files directly into the news/group/number format.
492
493       -bi  - build batch file for innxmit.  The articles are left intact, and
494       a batchfile is built with a one-up listing of the  full  path  of  each
495       article.  Then innxmit can be called:
496
497              %innxmit localhost batchfile
498
499       -bl  -  suck will call lmove to put the articles into news/group/number
500       format.  You must provide the name of the  configuration  file  on  the
501       command line.  The following arguments from suck are passed to lmove:
502
503              The  configuration  file  name (the batchfile name provided with
504              this option)
505              The directory specified for articles (-dm or built-in default).
506              The errorlog to log errors to (-e or -E),  if  provided  on  the
507              command line.
508              The phrases file (-l), if provided on the command line.
509              The Debug option, if provided on the command line.
510
511       -br  -  build  batch  file  for  rnews.   The articles are concatenated
512       together, with the #!rnews size article separator.  This can the be fed
513       to rnews:
514
515              %rnews -S localhost batchfile
516
517       -r  filesize   specify  maximum batch file size for rnews.  This option
518       allows you to specify the maximum size of a batch file  to  be  fed  to
519       rnews.  When this limit is reached, a new batch file is created AFTER I
520       finish writing the current article to the old batch file.   The  second
521       and  successive  batch files get a 1 up sequence number attached to the
522       file name specified with the -br.  Note that since  I  have  to  finish
523       writing  out the current article after reaching the limit, the max file
524       size is only approximate.
525
526       -bf - build a batch file for  innfeed.   This  batchfile  contains  the
527       MsgID  and full path of each article.  The main difference between this
528       and the innxmit option is that the innfeed file is built as  the  arti‐
529       cles  are downloaded, so that innfeed can be posting the articles, even
530       while more articles are downloaded.
531
532       -bp - This option tells suck to build a batch file, and post the  arti‐
533       cles  in  that  batchfile  to  the  localhost  (specified  with the -hl
534       option).  This option uses the IHAVE command  to  post  all  downloaded
535       articles to the local host.  The batch file is called suck.post, and is
536       put in the temporary directory (-dt).  It is deleted  upon  completion,
537       as  are the successfully posted articles.  If the article is not wanted
538       by the server (usually because it already exists on the server,  or  it
539       is  too  old), the article is also deleted.  If other errors occur, the
540       article is NOT deleted.  With the following command line, you can down‐
541       load and post articles without worrying if you are using INND or CNEWS.
542
543              %suck news.server.com -bp -hl localhost -A -c
544
545       -bP  NR - This option works identically to -bp above, except instead of
546       waiting until all articles are downloaded, it will  post  them  to  the
547       local server after downloading NR of articles.
548
549              %suck news.server.com -bP 100 -hl localhost -A -c
550
551

SUCK ARGUMENT FILE

553       If you specify @filename on the command line, suck will read from file‐
554       name and parse it for any arguments that you wish to pass to suck.  You
555       specify  the same arguments in this file as you do on the command line.
556       The arguments can be on one line, or spread out  among  more  than  one
557       line.   You  may  also use comments.  Comments begin with '#' and go to
558       the end of a line.  All command line arguments  override  arguments  in
559       the file.
560
561              # Sample Argument file
562              -bi batch # batch file option
563              -M   # use mode reader option
564
565

SUCKNEWSRC

567       Suck  looks  for  a  file  sucknewsrc to see what articles you want and
568       which you already received. The format of sucknewsrc is very simple. It
569       consists  of  one  line  for  each newsgroup.  The line contains two or
570       three fields.
571
572       The first field is the name of the group.
573
574       The second field is the highest article number that was  in  the  group
575       when that group was last downloaded.
576
577       The third field, which is optional, limits the number of articles which
578       can be downloaded at any given time.  If there are more  articles  than
579       this  number, only the newest are downloaded.  If the third field is 0,
580       then no new messages are downloaded.  If the command line option -lr is
581       specified,  instead of downloading the newest articles, suck will down‐
582       load the oldest articles instead.
583
584       The fields are separated by a space.
585
586              comp.os.linux.announce 1 [ 100 ]
587
588       When suck is finished, it creates the file  suck.newrc  which  contains
589       the new sucknewsrc with the updated article numbers.
590
591       To  add  a  new  newsgroup, just stick it in sucknewsrc, with a highest
592       article number of -1 (or any number less than 0).  Suck will  then  get
593       the  newest  X  number  of messages for that newsgroup.  For example, a
594       -100 would cause suck to download the  newest  100  articles  for  that
595       newsgroup.
596
597       To  tell  suck to skip a newsgroup, put a # as the first character of a
598       line.
599
600

SUCKKILLFILE and SUCKXOVER

602       There are two types of killfiles supported in suck.  The first, via the
603       file  suckkillfile,  kills  articles based on information in the actual
604       article header or body.   The second, via  the  file  suckxover,  kills
605       articles based on the information retreived via the NNTP command XOVER.
606       They are implemented in two fundamentally different  ways.   The  suck‐
607       killfile killing is done as the articles are downloaded, one at a time.
608       The XOVER killing is done while suck is getting the list of articles to
609       download,  and  before  a  single  article  is downloaded.  You may use
610       either, none or both type of killfiles.
611
612

SUCKKILLFILE and GROUP KEEP/KILLFILES

614       If suckkillfile exists,  the headers of  all articles will  be  scanned
615       and  the  article  downloaded  or  not,  based on the parameters in the
616       files.  If no logging option is specified (see the -L  options  above),
617       then the long logging option is used.
618
619       Comments  lines are allowed in the killfiles.  A comment line has a "#"
620       in the first position.  Everything on a comment line is ignored.
621
622       Here's how the whole  keep/delete  package  works.   All  articles  are
623       checked  against the master kill file (suckkillfile).  If an article is
624       not killed by the master kill file, then its group line is parsed.   If
625       a  group  file exists for one of the groups then the article is checked
626       against that group file.  If it matches a keep file, then it  is  kept,
627       otherwise  it  is  flagged  for deletion.  If it matches a delete file,
628       then it is flagged for deletion, otherwise it is kept.   This  is  done
629       for every group on the group line.
630
631       NOTES:  With the exception of the USE_EXTENDED_REGEX parameter, none of
632       these parameters are passed from the master killfile to the  individual
633       group  file.   Each  killfile  is separate and independant.  Also, each
634       search is case-insensitive unless specifically  specified  by  starting
635       the  search  string with the QUOTE character (see below).  However, the
636       parameter part of the search expression (the LOWLINE=, HILINE= part) is
637       case sensitive.
638

PARAMETERS

640              LOWLINES=#######
641              HILINES=#######
642              NRGRPS=####
643              NRXREF=####
644              QUOTE=c
645              NON_REGEX=c
646              GROUP=keep  groupname  filename  OR GROUP=delete groupname file‐
647              name
648              PROGRAM=pathname
649              PERL=pathname
650              TIEBREAKER_DELETE
651              GROUP_OVERRIDE_MASTER
652              USE_EXTENDED_REGEX
653              XOVER_LOG_LONG
654              HEADER:
655              Any Valid Header Line:
656              BODY:
657              BODYSIZE>
658              BODYSIZE<
659
660
661       All parameters are valid in both the master kill  file  and  the  group
662       files,  with  the exception of GROUP, PROGRAM, PERL, TIEBREAKER_DELETE,
663       and GROUP_OVERRIDE_MASTER.  These are only valid  in  the  master  kill
664       file.
665
666

KILL/KEEP Files Parameters

668       HILINES= Match any article longer than the number of lines specified.
669
670       LOWLINES= Match any article shorter than the number of lines specified.
671
672       NRGRPS= This line will match any article which has more groups than the
673       number specified on the Newsgroups: line.  Typically this is used in  a
674       killfile  to  prevent spammed articles.  (A spammed article is one that
675       is posted to many many groups, such as those  get-rich  quick  schemes,
676       etc.)
677
678       NRXREF= This line will match any article that has more groups than than
679       the number specified on the Xref: line.  This is another spamm stopper.
680       WARNING:  the Xref: line is not as accurate as the Newsgroups: line, as
681       it only contains groups known to the news server.   This option is most
682       useful  in  an xover killfile, as in Xoverviews don't typically provide
683       the Newsgroups: line, but do provide the Xref: line.
684
685       HEADER: Any Valid Header Line: Suck  allows  you  to  scan  any  single
686       header line for a particular pattern/string, or you may scan the entire
687       article header.  To scan an individual line, just specify it, for exam‐
688       ple to scan the From line for boby@pixi.com, you would put
689
690              From:boby@pixi.com
691
692       Note  that  the  header  line  EXACTLY matches what is contained in the
693       article.  To scan the Followup-To: line, simply put To search the  same
694       header line for multiple search items, then each search item must be on
695       a separate line, eg:
696              From:boby@xxx
697              From:nerd@yyy
698              Subject:suck
699              Subject:help
700       The parameter HEADER: is a special case of the above.  If you  use  the
701       HEADER:  parameter,  then  the  entire header is searched for the item.
702       You are allowed multiple HEADER: lines in each killfile.
703
704       When suck searches for the pattern, it only searches for  what  follows
705       the  :,  and  spaces  following  the : are significant.  With the above
706       example "Subject:suck", we will search the Subject header line for  the
707       string  "suck".   If  the  example had read "Subject: suck", suck would
708       have searched for the string " suck".  Note the extra space.
709
710       If your system has regex() routines on it, then the items searched  for
711       can  be  POSIX regular expressions, instead of just strings.  Note that
712       the QUOTE= option is still applied, even to regular expressions.
713
714       BODY: This parameter allows you to search the body of  an  article  for
715       text.   Again,  if your system has regex(), you can use regular expres‐
716       sions, and the QUOTE= option is also applied.  You are allowed multiple
717       BODY:  lines  in  each killfile.  WARNING:  Certain regex combinations,
718       especially with .* at the beginning, (eg  BODY:.*jpg),  in  combination
719       with large articles, can cause the regex code to eat massive amounts of
720       CPU, and suck will seem like it is doing nothing.
721
722       BODYSIZE> This parameter will match an article if the size of its  body
723       (not including the header) is greater than this parameter.  The size is
724       specified in bytes.
725
726       BODYSIZE< This parameter will match an article if the size of its body,
727       is less than this parameter.  The size is specified in bytes.
728
729       QUOTE=  This item specifies the character that defines a quoted string.
730       The default for this is a ".  If an item starts with the QUOTE  charac‐
731       ter,  then  the  item  is checked as-is (case significant).  If an item
732       does not start with the QUOTE character, then the item is checked  with
733       out regard to case.
734
735       NON_REGEX=  This items specifies the character that defines a non-regex
736       string.  The default for this is a %.   If  an  item  starts  with  the
737       NON_REGEX character, then the item is never checked for regular expres‐
738       sions.  If the item doesn't start with the QUOTE character,  then  suck
739       tries  to  determine  if  it is a regular expression, and if it is, use
740       regex() on it.  This item is so that you can tell suck to treat strings
741       like "$$$$ MONEY $$$$" as non-regex items.    IF YOU USE BOTH QUOTE and
742       NON_REGEX characters on a string, the NON_REGEX character  MUST  appear
743       first.
744
745       GROUP= This line allows you to specify either keep or delete parameters
746       on a group by group basis.  There are three parts to this  line.   Each
747       part  of  this  line must be separated by exactly one space.  The first
748       part is either "keep" or "delete".  If it is keep, then  only  articles
749       in  that  group  which match the parameters in the group file are down‐
750       loaded.  If it is delete, articles in that group which match the param‐
751       eters  are not downloaded.  The second part, the group name is the full
752       group name for articles to check against the group  file.    The  group
753       name  may contain an * as the last character, to match multiple groups,
754       eg:     "comp.os.linux.*"     would    match    comp.os.linux.announce,
755       comp.os.linux.answers,  etc..   The third part specifies the group file
756       which contains the parameters to check  the  articles  against.   Note,
757       that  if  you specified a postfix with the -p option, then this postfix
758       is attached to the name of the file when suck looks for it, UNLESS  you
759       use the -k option above.
760
761       GROUP_OVERRIDE_MASTER  This allows you to override the default behavior
762       of the master kill file.  If this option is in the  master  kill  file,
763       then  even  if  an  article  is flagged for deletion by the master kill
764       file, it is checked against the group files.  If the group  files  says
765       to not delete it, then the article is kept.
766
767       TIEBREAKER_DELETE  This option allows you to override the built-in tie-
768       breaker default.  The potential exists for a message to be  flagged  by
769       one group file as kept, and another group file as killed.  The built-in
770       default is to then keep the message.  The TIEBREAKER_DELETE option will
771       override that, and caused the article to be deleted.
772
773       USE_EXTENDED_REGEX  This  option  tells  suck  to  use extended regular
774       expressions vice standard regular expressions.  It may used in the mas‐
775       ter killfile, in which case it applies to all killfiles, or in an indi‐
776       vidual killfile, where it only applies to the parameters that follow it
777       in the killfile.
778
779       XOVER_LOG_LONG  This option tells suck to format the killfile generated
780       by from an Xover killfile so that it looks like an article header.  The
781       normal output is to just print the Xover line from theserver.
782
783       PROGRAM=  This  line  allows  suck to call an external program to check
784       each article.  You may specify any arguments in addition to the program
785       name  on  this  line.   If this line is in your suckkillfile, all other
786       lines are ignored.  Instead, the headers are  passed  to  the  external
787       program, and the external program determines whether or not to download
788       the article.  Here's how it works.  Suck will fork your  program,  with
789       stdin  and  stdout redirected.  Suck will feed the headers to your pro‐
790       gram thru stdin, and expect a reply back thru stdout.  Here's the  data
791       flow for each article:
792
793              1.  suck  will  write a 8 byte long string, which represents the
794              length of the header record on stdin of  the  external  program.
795              Then  length is in ascii, is left-aligned, and ends in a newline
796              (example: "1234   \n").
797              2. suck will then write the header on stdin of the external pro‐
798              gram.
799              3.  suck  will  wait  for a 2 character response code on stdout.
800              This response code is either "0\n" or "1\n" (NOT BINARY ZERO  OR
801              ONE,  ASCII ZERO OR ONE).  If the return code is zero, suck will
802              download the article, if it is one, suck won't.
803              4. When there are no more articles, the length written down (for
804              step  1)  will be zero (again in ascii "0       \n").  Suck will
805              then wait for the external program to exit before continuing on.
806              The  external  program  can do any clean up it needs, then exit.
807              Note: suck will not continue processing until the external  pro‐
808              gram exits.
809
810
811       PERL=  This  line  allows  suck to call a perl subroutine to check each
812       article.  In order to use this option,  you  must  edit  the  Makefile,
813       specifically the PERL* options.  If the PERL= line is in your suckkill‐
814       file, all other lines are ignored.  Instead, the header is sent to your
815       perl subroutine, and your subroutine determines if the article is down‐
816       loaded or not.  The parameter on the PERL= line specifies the file name
817       of the perl routine eg:
818
819              PERL=perl_kill.pl
820
821
822       See  the sample/perl_kill.pl for a sample perl subroutine.  There are a
823       couple of key points in this sample.  The "package  Embed::Persistant;"
824       must  be in the perl file.  This is so that any variable names you cre‐
825       ate will not conflict with variable names in suck.   In  addition,  the
826       subroutine  you  define  must  be  "perl_kill",  unless  you change the
827       PERL_PACKAGE_SUB define in suck_config.h.  Also, your  subroutine  must
828       return exactly one value, an integer, either 0 or 1.  If the subroutine
829       returns 0, then the article is downloaded, otherwise,  the  article  is
830       not downloaded.
831
832
833       NOTES:  The  perl  file  is only compiled once, before any articles are
834       downloaded.  This is to prevent lengthy delays between  articles  while
835       the  perl  routine  is  re-compiled.   Also, you must use Perl 5.003 or
836       newer.  In addition, you are advised to run 'perl  -wc  filter'  BEFORE
837       using  your filter, in order to check for syntax errors and avoid prob‐
838       lems.
839
840

SUCKXOVER

842       If the file suckxover exists, then suck uses the XOVER command  to  get
843       information  on  the articles and decide whether or not to download the
844       article.  Xover files use the same syntax as  suckkillfiles,  but  sup‐
845       ports a subset of the commands.
846
847       The following killfile commands are not supported in suckxover files:
848              NRGROUPS:
849              HEADER:
850              BODY:
851              TIEBREAKER_DELETE:
852
853       Only the following header lines will be checked:
854              Subject:
855              From:
856              Message-ID:
857              References:
858
859       The behaviour of the size commands ( BODYSIZE>, BODYSIZE<, HILINES, and
860       LOWLINES ) specify the total size of the article (not just the body) in
861       bytes or lines, respectively.
862
863       All  other  parameters  are  allowed.   However,  if you use an invalid
864       parameter, it is silently ignored.
865

SUCKXOVER and PROGRAM= or PERL= parameters

867       These parameters are supported in a suckxover file, however  they  work
868       slightly  differently than described above.  The key difference is that
869       prior to sending each individual xoverview line to your  program,  suck
870       will  send  you  the  overview.fmt  listing  that it retrieves from the
871       server.  This overview.fmt is  a  tab-separated  line,  describing  the
872       fields in each overview.fmt line.
873
874       For the PROGRAM= parameter, suck will first send your program an 8 byte
875       long string, which is the length of the overview.fmt.  This  length  is
876       formatted  as  the  lengths  above (see nr1 under PROGRAM=).  Suck will
877       then send the overview.fmt.  After  that,  the  flow  is  as  described
878       above.  See sample/killxover_child.c for an example.
879
880       For  the  PERL= parameter, Your program must have two subroutines.  The
881       first is perl_overview, which will recieve the  overview.fmt,  and  not
882       return  anything.   The  second  subroutine  is  perl_xover, which will
883       recieve the xoverview line, and return 0 or  1,  as  described  in  the
884       PERL= above.  See sample/perl_xover.pl for an example.
885
886

SUCKOTHERMSGS

888       If  suckothermsgs  exists,  it  must  contain lines formatted in one of
889       three ways.  The first way is a line containing a Message-ID, with  the
890       <> included, eg:
891
892                   <12345@somehost.com>
893
894       This will cause the article with that Message-ID to be retrieved.
895
896       The  second  way  is  to  put a group name and article number on a line
897       starting with an !, eg:
898                   !comp.os.linux.announce 1
899
900       This will cause that specific article to be downloaded.
901
902       You can also get a group of articles from a group by using the  follow‐
903       ing syntax:
904                   !comp.os.linux.announce 1-10
905
906       Whichever  method  you use, if the article specified exists, it will be
907       downloaded, in addition to any articles retreived via  the  sucknewsrc.
908       These ways can be used to get a specific article in other groups, or to
909       download an article that was killed.  These articles ARE NOT  processed
910       through the kill articles routines.
911
912

SUCKNODOWNLOAD

914       If sucknodownload exists, it must consist of lines contaning a Message-
915       ID, with the <> included, eg:
916
917                   <12345@somehost.com>
918
919       This will cause the article with that  Message-ID  to  NEVER  be  down‐
920       loaded.   The Message-ID must begin in the first column of the line (no
921       leading spaces).  This file overrides suckothermsgs so if an article is
922       in both, it will not be downloaded.
923
924

POST FILTER

926       if  the  -y post_filter option is specified on the command line in con‐
927       junction with any of the batch modes, then suck will call the post fil‐
928       ter  specified,  after  downloading  the  articles,  and  before batch‐
929       ing/posting the articles.  The filter is passed the directory where the
930       articles  are stored (the -dm option).  The filter program is responsi‐
931       ble for parsing the contents of the  directory.   See  sample/post_fil‐
932       ter.pl for a sample post filter.  This option was designed to allow you
933       to add your own host name to the Path: header, but if you  need  to  do
934       anything else to the messages, you can.
935
936

FOREIGN LANGUAGE PHRASES

938       If    the    -l    phrases    option   is   specified   or   the   file
939       /usr/local/lib/suck.phrases (defined  in  suck_config.h)  exists,  then
940       suck  will  load  an alternate language phrase file, and use it for all
941       status & error messages, instead of the built-in defaults.  The command
942       line  overrides  the build in default, if both are present.  The phrase
943       file contains all messages used by suck, rpost,  testhost,  and  lmove,
944       each  on  a separate line and enclosed in quotes.  To generate a sample
945       phrase file, run make phrases from the command line.  This will  create
946       "phrases.engl",  which  is  a list of the default phrases.  Simply edit
947       this file, changing the english phrases to the language of your  choos‐
948       ing,  being  sure to keep the phrases within the quotes.  These phrases
949       may contain variables to print items provided by the program,  such  as
950       hostname.   Variables  are  designated  by  %vN%  where  N  is a one-up
951       sequence per phrase.  These variables may exist in  any  order  on  the
952       phrase line, for example,
953              "Hello, %v1%, welcome to %v2%"     or
954              "Welcome to %v2%, %v1%"
955       are both valid phrases.  Phrases may contain,  \n, \r, or \t to print a
956       newline, carriage return, or tab, respectively.  Note  that  the  first
957       line of the phrase file is the current version number.  This is checked
958       against the version of suck running, to be sure that the  phrases  file
959       is the correct version.
960
961       If  you modify any of the source code, and add in new phrases, you will
962       need to regenerate phrases.h, so that everything works  correctly.   To
963       recreate, just run make phrases.h from the command line.
964

SIGNAL HANDLING

966       Suck  accepts  two signals, defined in suck_config.h.  The first signal
967       (default SIGTERM) will cause Suck to  finish  downloading  the  current
968       article,  batch up whatever articles were downloaded, and exit, without
969       an error.
970
971       The second signal (default SIGUSR1) will cause suck to  use  the  pause
972       values defined with the -w option (see above).
973
974

EXIT CODES

976       Suck will exit with the following return codes:
977              0 = success
978              1 = no articles available for download.
979              2  = suck got an unexpected answer to a command it issued to the
980              remote server.
981              3 = the -V option was used.
982              4 = suck was unable  to  perform  NNTP  authorization  with  the
983              remote server.
984              -1 = general error.
985

HISTORY

987              Original Author - Tim Smith (unknown address)
988              Maintainers -
989              March 1995 - Sven Goldt (goldt@math.tu-berlin.de)
990              July 1995  - Robert A. Yetman (boby@pixi.com)
991

SEE ALSO

993       testhost(1), rpost(1), lpost(1).
994
995
996
997                                                                       SUCK(1)
Impressum