SUCK(1)
π SUCK(1) π
okay so this is suck, and she's your bestie for pulling a small newsfeed from an NNTP server while avoiding the NEWNEWS command. iconic behavior, honestly. π
πΈ NAME πΈ
suck β Pull a small newsfeed from an NNTP server, avoiding the NEWNEWS command. periodt.
π¦ SYNOPSIS π¦
suck [ hostname ] [ @filename ] [ -V ] [ -K ] [ -L[SL] ] [ -LF filename ] [ -H ] [ -HF filename ] [ -d[tmd] dirname ] [ -s | -S filename ] [ -e | -E filename ] [ -a ] [ -m ] [ -b[irlf] batchfile ] [ -r filesize ] [ -p extension ] [ -U userid ] [ -P password ] [ -Q ] [ -c ] [ -M ] [ -N port_number ] [ -W pause_time pause_nr_msgs ] [ -w pause_time pause_nr_msgs ] [ -l phrase_file ] [ -D ] [ -R ] [ -q ] [ -C count ] [ -k ] [ -A ] [ -AL activefile ] [ -hl localhost ] [ -bp ] [ -T timeout ] [ -n ] [ -u ] [ -z ] [ -x ] [ -B ] [ -O ] [ -G ] [ -X ] [ -f ] [ -y post_filter ] [ -F ] [ -g ] [ -i number_to_read ] [ -Z ] [ -rc ] [ -lr ] [ -sg ] [ -ssl ] [ -SSL ]
π Options valid in all modes π
hostnameβ the hostname can optionally include the port number, in the formHost:Port. If this option is used, any port number specified via the-Noption is ignored. so don't double up, bestie.@filenameβ this option tellssuckto read other options from a file in addition to the commandline. extra credit behavior, love that.-aβ this option forcessuckto always batch up any downloaded articles, even ifsuckaborts for any reason. Without this option,suckwill only batch up articles if it finishes successfully or is cancelled by a signal (see below). the way that βsee belowβ is doing the mostβ¦-Aβ this option tellssuckto scan the localhost (specified with the-hloption) and use its active file to build and update thesucknewsrc. If you add a group to your local server,suckwill add it tosucknewsrcand download articles. Or, if you delete a group from your local server, it will be deleted fromsucknewsrc. If posting is not allowed to a particular group, then the line insucknewsrcis just commented out. With this option, you should never have to edit yoursucknewsrc. In case you have newsgroups (likecontrolandjunk) that you don't want downloaded, you can put these newsgroups in a fileactive-ignore, one per line, andsuckwill ignore these newsgroups when it scans the localhost. If your system supportsregex(), you may use regular expressions in theactive-ignorefile to skip multiple groups, eg:fred.*. If you use the-p(postfix) option,suckwill check for the existence of anactive-ignorefile with the postfix. If that doesn't exist, thensuckwill check for the existence of the file without the postfix.
NOTE: If the localhost is on a non-standard port, the port number may be specified as part of the hostname, in the form Host:Port.
NOTE: If you use regular expressions,suckwill silently add a"^"to the beginning of the group name, and a"$"to the end of the group name if they aren't already present, so that if you have"comp.os.linux", it won't match"comp.os.linux.answers"or if you have"alt.test"it doesn't match"comp.alt.test".
-AL activefileβ this option is identical to the-Aoption, except it reads the active file from the local file specified instead of reading it from the localhost. All the caveats from the-Aoption apply to this option as well. If both options are used on the command line,suckfirst tries to use the-Aoption, then if that fails it uses this option. fallback queen.-Bβ this option tellssuckto attempt to batch up any articles in its directory BEFORE starting to download messages. This can be useful if you have a problem with the previous download. This option will only work if you specify a batch option (see below). If there are no messages to batch up, some of the batch options may produce warning messages. They may be safely ignored. Also, if the batch files exist at the end of the run, ininn-batchmode, it will be overwritten, since the new batch file will contain all messages. Inrnewsmode, if the batch file exists, it will abort and not batch up any messages. ngl this is giving βclean up your mess before you make a new one.β-cβ if this option is specified,suckwill clean up after itself. This includes:- Moving
sucknewsrctosucknewsrc.old - Moving
suck.newrctosucknewsrc rm suck.sortedandsuckothermsgs.
- Moving
-C countβ this option tellssuckto drop the connection and reopen it everycountnumber of articles. This is designed to battle INN'sLIKE_PULLERS=DONToption, that some folks compile in. WithLIKE_PULLERS=DONT, after 100 messages INN will pause between every message, dramatically reducing your download speed. I don't recommend the use of this, but if you have no other choice.... lowkey chaotic, but okay.-dd dirnameβ-dd dirname= directory of data files used bysuck(sucknewsrcsuckkillfilesuckothermsgsactive-ignoresucknodownload)-dm dirnameβ-dm dirname= directory for storage of articles created in Multifile mode or batch mode. DO NOT make this the same as the directories used for the-dtor-doptions, or you will lose all your configuration files. not me warning you twiceβ¦-dt dirnameβ-dt dirname= directory of temp files created bysuck(suck.newrc,suck.sort,suck.restart,suck.killlog,suck.post).
Specify the location of the various files used by suck.
-Dβ this option tellssuckto log various debugging messages to"debug.suck", primarily for use by the maintainer. main character energy, but only for the maintainer.-e|-E filenameβ these options will send all error messages (normally displayed onstderr), to an alternate file. The lower case version,-e, will send the error messages to the compiled-in default defined insuck_config.h. The default issuck.errlog. The upper case version,-E, requires thefilenameparameter. All error messages will then be sent to this file. so if stderr is too loud, send it somewhere else.-fβ this option tellssuckto reconnect after deduping, and before downloading the articles. This is in case long dedupe times cause timeouts on the remote end.-Fβ this option tellssuckto reconnect after reading the local active file, and before downloading the Msg-IDs. This is in case of a large active file, which causes timeouts on the remote end.-gβ this option causessuckto only download the headers of any selected articles. As a result of this, any batching of articles is skipped. This option does work with killfiles, however, killfile options such asBODYSIZE>will be ignored, since the body of the article will never be downloaded.-Gβ this option causessuckto display the message count and BPS status lines in a slightly different format, more suitable for use by a filter program (such as a GUI). for the visual learners, slay.-Hβ this option will causesuckto bypass the history check.-HF history_file_nameβ this option tellssuckthe location of the history file. The default is at/var/lib/news/history.-hl localhostβ this option specifies the localhost name. This option is required with both the-Aand the-bpoption. required, bestie, don't forget it.-i number_to_readβ this option tellssuckthe number of articles to download if you are using the-Aor-ALoption, and a new group is added. The default is defined insuck_config.h(ACTIVE_DEFAULT_LASTREAD, currently-100). NOTE: This must be a negative number (eg-100,-50), or0, to download all articles currently available in the group.-kβ this option tellssuckto NOT attach the postfix from the-poption to the names of the killfiles, both the master killfile and any group files. This allows you to maintain one set of killfiles for multiple servers.-Kβ this option will causesuckto bypass checking the killfile(s). skip the drama, love that for you.-l phrase_fileβ this option tellssuckto load in an alternate phrase file, instead of using the built-in messages. This allows you to havesuckprint phrases in another language, or to allow you to customize the messages without re-buildingsuck. See below.-lrβ this option, is used in conjunction with the highest article option in thesucknewsrc, to download the oldest articles, vice the newest articles. See that section for more details.-Lβ this option tellssuckto NOT log killed articles tosuck.killlog.-LF filenameβ this option allows you to override the built-in default of"suck.killlog"for the file which contains the log entries for killed articles.-LLβ this option tellssuckto create long log entries for each killed article. The long entry contains the short log entry and the header for the killed message.-LSβ this option tellssuckto create short log entries for each killed article. The short entry contains which group and which pattern was matched, as well as the MsgID of the killed article.-Mβ this option tellssuckto send the"mode reader"command to the remote server. If you get an invalid command message immediately after the welcome announcement, then try this option. try it, it might eat.-nβ this option tellssuckto use the article number vice the MsgId to retrieve the articles. This option is supposedly less harsh on the remote server. It can also eliminate problems if your ISP ages off articles quickly and you frequently get"article not found"errors. Also, if your ISP uses DNEWS, you might need this option so that it knows you're reading articles in a group.-N port_numberβ this option tellssuckto use an alternate NNRP port number when connecting to the host, instead of the default,119.-Oβ this option tellssuckto skip the first article upon restart. This is used whenever there is a problem with an article on the remote server. For some reasons, some NNTP servers, when they have a problem with a particular article, they time out. Yet, when you restart, you're back on the same article, and you time out again. This option tellssuckto skip the first article upon restart, so that you can get the rest of the articles. the way that loop is giving nightmare blunt rotationβ¦-p extensionβ this extension is added to all files so that you can have multiple site feeds. For example, if you specify-p .dummy, thensucklooks forsucknewsrc.dummy,suckkillfile.dummy, etc, and creates its temp files with the same extension. This will allow you to keep multiplesucknewsrcfiles, one for each site. multiple feeds? we love a multiverse moment.-qβ this option tellssuckto not display the BPS and article count messages during download. Handy when runningsuckunattended, such as from acrontab.-Rβ this option tellssuckto skip a rescan of the remote newserver upon a restart. The default is to rescan the newserver for any new articles wheneversuckruns, including restarts.-rcβ this option tellssuckto change its behavior when the remote server resets its article counters. The default behavior is to reset thelastreadinsucknewsrcto the current high article counter. With this option,suckresets thelastreadinsucknewsrcto the current low article counter, causing it to suck all articles in the group, and using thehistorydbroutines to dedupe existing articles.-s|-S filename
Ok so these next options are all about where your status messages go, bestie. Normally they're vibing on stdout, but we can yeet them somewhere else entirely. The lowercase -s sends them to the compiled-in default defined in suck_config.h β and that default is /dev/null, so basically silence, nothing, a void π. The uppercase -S needs you to hand it a filename parameter, and then every status message goes to that file instead. Choose wisely.
-sgβ tells suck to add the name of the current group being downloaded, if it knows it, to the BPS display. Usually the only time suck doesn't know the group name is when an article gets downloaded via thesuckothermsgsfile. iykyk.-sslβ tells suck to use SSL when it talks to the remote server β but only if suck was compiled with SSL support. No compile, no SSL, no cap.-SSLβ same energy, different server: tells suck to use SSL when it talks to the local server, if suck was compiled with SSL support. π¦-T timeoutβ overrides the compiled-inTIMEOUTvalue. This is how long suck waits for data from the remote host before it gives up and aborts. The timeout value is in seconds.-uβ tells suck to send theAUTHINFO USERcommand immediately on connect to the remote server, instead of waiting politely for someone to ask for authorization. Heads up: you must supply the-Uand-Poptions when you use this one.-U useridβ lets you specify a userid, if your NNTP server requires one.-P passwordβ lets you specify a password, if your NNTP server requires one.-Qβ tells suck to grab the userid and password for NNTP authentication from the environment variablesNNTP_USERandNNTP_PASSinstead of using-Uor-P. This dodges a potential security problem where somebody running apscommand could literally see your userid and password. Protect yourself, queen π.-Vβ makes suck print out the version number and then exit. Short and iconic.-w pause_timer pause_nr_msgsβ this one lets you slow suck down while it's pulling articles. If you send suck a predefined signal (default isSIGUSR1, seesuck_config.h), suck will swap the default pause options (the ones you specified with-W) with the values from this option. Example: you run suck with-w 2 2, and you send suck aSIGUSR1usingkillβ suck will then pause 2 seconds between every other message, letting the server "catch its breath." Send suck anotherSIGUSR1and it puts the default pause options back. And if no pause options were specified on the command line (you omitted-W), suck returns to the default full-speed pull. ποΈ-W pause_time pause_nr_msgsβ tells suck to pause between the download of articles. You gotta specify how long to pause (in seconds) and how often to pause (every X number of articles). Example:-W 10 100makes suck pause for 10 seconds every 100 articles. Why would anyone want this? Because suck can cause heavy loads on a remote server, and this pause lets that server "catch its breath." Be a considerate bestie πΈ.-xβ tells suck to not check the Message-IDs for the ending>character. This one exists for brain dead NNTP servers that truncate theXHDRinformation at 72 characters. Not their fault, but also... their fault.-Xβ tells suck to bypass theXOVERkillfiles. Simple as that.-y post_filterβ only valid when using any of the batch modes. It lets you edit any or all of the articles downloaded before posting to the local host. See below for more details π.-zβ tells suck to bypass the normal deduping process. This is primarily for slow machines where the deduping takes longer than the download of messages would. > Not recommended. Like, at all. You've been warned π-Zβ tells suck to use theXOVERcommand instead of theXHDRcommand to retrieve the info needed to download articles. Use this if your remote news server doesn't supportXHDR. Periodt.
π LONG OPTION EQUIVALENTS π
Every short flag, but make it verbose β¨:
-aβ--always_batch-biβ--batch-inn-brβ--batch_rnews-blβ--batch_lmove-bfβ--batch_innfeed-bpβ--batch_post-cβ--cleanup-dtβ--dir_temp-ddβ--dir_data-dmβ--dir_msgs-eβ--def_error_log-fβ--reconnect_dedupe-gβ--header_only-hβ--host-hlβ--localhost-kβ--kill_no_postfix-lβ--language_file-lrβ--low_read-mβ--multifile-nβ--number_mode-pβ--postfix-qβ--quiet-rβ--rnews_size-rcβ--resetcounter-sβ--def_status_log-sgβ--show_group-sslβ--use_ssl-wβ--wait_signal-xβ--no_chk_msgid-yβ--post_filter-zβ--no_dedupe-Aβ--active-ALβ--read_active-Bβ--pre-batch-Cβ--reconnect-Dβ--debug-Eβ--error_log-Gβ--use_gui-Hβ--no_history-HFβ--history_file-Kβ--killfile-Lβ--kill_log_none-LSβ--kill_log_short-LLβ--kill_log_long-Mβ--mode_reader-Nβ--portnr-Oβ--skip_on_restart-Pβ--password-Qβ--password_env-Rβ--no_rescan-Sβ--status_log-SSLβ--local_use_ssl-Tβ--timeout-Uβ--userid-Vβ--version-Wβ--wait-Xβ--no_xover-Zβ--use_xover
π DESCRIPTION π
MODE 1 - stdout mode
%suck
%suck myhost.com
Suck grabs news from an NNTP server and sends the articles straight to stdout. Suck accepts the name of an NNTP server as its argument β or, if you don't give it an argument, it'll take the environment variable NNTPSERVER. You can redirect the articles to a file, or compress them on the fly like suck server.domain | gzip -9 > output.gz. After that? It's literally up to you what you do with the articles. Maybe you already have the output on your local machine because you used a slip line, or maybe you still gotta transfer the output over. Either way, the vibes are yours π¦.
MODE 2 - Multifile mode
%suck -m
%suck myhost.com -m
Suck grabs news from an NNTP server and stores each article in a separate file. They get stored in the directory specified in suck_config.h, or by the -dm command line option. One article, one file, organized queen energy π.
MODE 3 - Batch mode
%suck myhost.com -b[irlf] batchfile
or %suck myhost.com -bp -hl localhost
or %suck myhost.com -bP NR -hl localhost
%suck myhost.com -b[irlf] batchfile
Suck will grab news articles from an NNTP server and store them into files β one per article (that's Multifile mode again, bestie). The location of those files is based on the defines in suck_config.h and the command line -dm. Once suck is done downloading, it builds a batch file that can be processed by either innxmit or rnews, or it'll call lmove to put the files directly into the news/group/number format. Slay.
-biβ build a batch file forinnxmit. The articles are left intact, and a batchfile is built with a one-up listing of the full path of each article. Then you can callinnxmitlike this:
%innxmit localhost batchfile
-blβ suck will calllmoveto put the articles intonews/group/numberformat. You must provide the name of the configuration file on the command line. The following arguments from suck are passed tolmove:- The configuration file name (the batchfile name provided with this option)
- The directory specified for articles (
-dmor built-in default) - The errorlog to log errors to (
-eor-E), if provided on the command line - The phrases file (
-l), if provided on the command line - The
Debugoption, if provided on the command line
-brβ build a batch file forrnews. The articles get concatenated together, with the#!rnewssize article separator. Then you can feed it tornews:
%rnews -S localhost batchfile
-r filesizeβ specify maximum batch file size forrnews. This option lets you set the maximum size of a batch file fed tornews. When this limit is reached, a new batch file is created after I finish writing the current article to the old batch file. The second and every successive batch file gets a 1-up sequence number attached to the file name you specified with-br. > Note that since I have to finish writing out the current article after reaching the limit, the max file size is only approximate. Don't come for me about it π-bfβ build a batch file forinnfeed. This batchfile contains the MsgID and full path of each article. The main difference between this and theinnxmitoption is that theinnfeedfile is built as the articles are downloaded, soinnfeedcan be posting the articles even while more articles are being downloaded. Multitasking icon β-bpβ tells suck to build a batch file, and post the articles in that batchfile to the localhost (specified with the-hloption). This option uses theIHAVEcommand to post all downloaded articles to the local host. The batch file is calledsuck.post, and lives in the temporary directory (-dt). It gets deleted upon completion, as do the successfully posted articles. If the article is not wanted by the server (usually because it already exists on the server, or it's too old), the article is also deleted. If other errors occur, the article is NOT deleted. With the following command line, you can download and post articles without worrying whether you're using INND or CNEWS:
%suck news.server.com -bp -hl localhost -A -c
-bP NRβ works identically to-bpabove, except instead of waiting until all articles are downloaded, it will post them to the local server after downloadingNRof articles.
%suck news.server.com -bP 100 -hl localhost -A -c
π SUCK ARGUMENT FILE π
If you specify @filename on the command line, suck will read from filename and parse it for any arguments you wish to pass to suck. You specify the same arguments in this file as you do on the command line. The arguments can be on one line, or spread out across more than one line. You may also use comments β comments begin with # and go to the end of a line. And hey, all command line arguments override arguments in the file π
# Sample Argument file
-bi batch # batch file option
-M # use mode reader option
πΈ SUCKNEWSRC πΈ
Okay bestie, so this is the file where suck keeps the receipts. π Suck goes looking for a file called sucknewsrc to figure out which articles you actually want and which ones you've already collected. And the format? Iconic. Truly no notes. It's just one line per newsgroup, and every line has two or three fields. That's it. That's the whole thing. β¨
- The first field is the name of the group. Obviously. π
- The second field is the highest article number that was in the group when that group was last downloaded. So like, the bookmark of it all. π
- The third field is optional, and it limits how many articles can be downloaded at any given time. If there are more articles than this number, only the newest ones get downloaded. If the third field is
0, then literally no new messages are downloaded, bestie, it's a full stop. And if the command line option-lris specified, then instead of grabbing the newest articles, suck downloads the oldest articles instead. Character development. π¦
The fields are separated by a space. Simple as.
comp.os.linux.announce 1 [ 100 ]
When suck is finished, it creates the file suck.newrc, which contains the new sucknewsrc with the updated article numbers. Glow up complete. π
Wanna add a new newsgroup? Just stick it in sucknewsrc with a highest article number of -1 (or honestly any number less than 0, we're not picky). Suck will then get the newest X number of messages for that newsgroup. So for example, a -100 would cause suck to download the newest 100 articles for that newsgroup. Math, but make it cute. π
And to tell suck to skip a newsgroup? Put a # as the first character of a line. Boom, ghosted. π
π₯ SUCKKILLFILE and SUCKXOVER π₯
Okay so there are two types of killfiles supported in suck, and they are giving very different energies, ngl.
- The first one, via the file
suckkillfile, kills articles based on information in the actual article header or body. Reading the whole thing, judging it, deciding its fate. π€ - The second one, via the file
suckxover, kills articles based on the information retrieved via the NNTP commandXOVER. Judging from the metadata alone, honestly iconic. π
They're implemented in two fundamentally different ways, and you need to know this:
- The
suckkillfilekilling is done as the articles are downloaded, one at a time. So it's out here making decisions in real time. π«Ά - The XOVER killing is done while suck is getting the list of articles to download, and before a single article is downloaded. Like, it pre-games the entire thing. β¨
You may use either, none, or both types of killfiles. Your call, bestie, no pressure. π
π SUCKKILLFILE and GROUP KEEP/KILLFILES π
If suckkillfile exists, then the headers of all articles will be scanned, and the article downloaded or not, based on the parameters in the files. And listen β if no logging option is specified (see the -L options above), then the long logging option is used. Default behaviour, periodt. π
Comment lines are allowed in the killfiles. A comment line has a # in the first position. Everything on a comment line is ignored. It's giving "no thoughts, head empty" and honestly, respect. π
Here's how the whole keep/delete package works, step by step, because the way that this thing cascades is a lot:
- All articles are checked against the master kill file (
suckkillfile). - If an article is not killed by the master kill file, then its group line is parsed.
- If a group file exists for one of the groups, then the article is checked against that group file.
- If it matches a keep file, then it is kept. Otherwise, it is flagged for deletion.
- If it matches a delete file, then it is flagged for deletion. Otherwise, it is kept.
- This is done for every group on the group line.
NOTES: With the exception of the USE_EXTENDED_REGEX parameter, none of these parameters are passed from the master killfile to the individual group file. Each killfile is separate and independent. They do not text each other. π«π± Also, each search is case-insensitive unless specifically specified by starting the search string with the QUOTE character (see below). However, the parameter part of the search expression (the LOWLINE=, HILINE= part) is case sensitive. Yes, it's inconsistent. Yes, we're aware. Moving on. π
β¨ PARAMETERS β¨
Here's the whole menu, bestie. Every single one, no skipping:
LOWLINES=#######
HILINES=#######
NRGRPS=####
NRXREF=####
QUOTE=c
NON_REGEX=c
GROUP=keep groupname filename OR GROUP=delete groupname filename
PROGRAM=pathname
PERL=pathname
TIEBREAKER_DELETE
GROUP_OVERRIDE_MASTER
USE_EXTENDED_REGEX
XOVER_LOG_LONG
HEADER:
Any Valid Header Line:
BODY:
BODYSIZE>
BODYSIZE<
All parameters are valid in both the master kill file and the group files β with the exception of GROUP, PROGRAM, PERL, TIEBREAKER_DELETE, and GROUP_OVERRIDE_MASTER. Those five are only valid in the master kill file. So don't go putting them in your group files, they will simply not be received. π«Ά
πΈ KILL/KEEP Files Parameters πΈ
okay bestie, this is the part where the killfiles actually get powers. Buckle up, there's a lot. π
HILINES=β matches any article that's longer than the number of lines you put here. πLOWLINES=β matches any article that's shorter than the number of lines you put here. πNRGRPS=β matches any article that's in more groups than the number you specify, counting theNewsgroups:line. Usually you drop this in a killfile to stop spam articles. (a "spammed article" is one posted to a million million groups, like those get-rich-quick schemes, etc. π)NRXREF=β matches any article with more groups than the number you give, counting theXref:line. Another spam stopper, bestie. π
WARNING: theXref:line is not as accurate as theNewsgroups:line, because it only contains groups that the news server knows about. This option is most useful in an xover killfile, since Xoverviews don't typically give you theNewsgroups:line, but they do give you theXref:line. β¨
HEADER:β any valid header line, bestie!! Suck lets you scan any single header line for a particular pattern/string, or you can scan the entire article header. To scan one specific line, just say it. Like, say you wanna scan theFromline forboby@pixi.com, you'd write:
From:boby@pixi.com
Note that the header line matches EXACTLY what's in the article. To scan the Followup-To: line, simply put
To search the same header line for multiple things, each search item has to live on its own separate line, like:
From:boby@xxx
From:nerd@yyy
Subject:suck
Subject:help
The HEADER: parameter is a special case of all that β if you use HEADER:, then the entire header gets searched for your item. You're allowed multiple HEADER: lines in each killfile, no cap. π
When suck searches for the pattern, it only searches for what comes after the :, and spaces after the : are significant. π With the example above, Subject:suck, we search the Subject header line for the string suck. If the example had said Subject: suck, suck would've been hunting for the string suck β note that extra space, it matters!! π
If your system has regex() routines on it, then the items you search for can be POSIX regular expressions instead of plain strings. Note that the QUOTE= option is still applied, even to regular expressions. π¦
BODY:β this one lets you search the body of an article for text. Again, if your system hasregex(), you can use regular expressions, and theQUOTE=option is applied here too. You're allowed multipleBODY:lines in each killfile. πΈ
WARNING: certain regex combos β especially with.*at the beginning, likeBODY:.*jpgβ combined with large articles, can make the regex code eat massive amounts of CPU, and suck will look like it's just doing nothing. π Not the vibe. Be careful.
BODYSIZE>β matches an article if the size of its body (not including the header) is greater than this parameter. The size is in bytes. π¦BODYSIZE<β matches an article if the size of its body is less than this parameter. The size is in bytes. π«§QUOTE=β this specifies the character that defines a quoted string. The default is a". Here's the tea: if an item starts with theQUOTEcharacter, then the item is checked as-is (case significant β¨). If an item does not start with theQUOTEcharacter, then it's checked without regard to case.NON_REGEX=β this specifies the character that defines a non-regex string. The default is a%. If an item starts with theNON_REGEXcharacter, then that item is never checked for regular expressions. If the item doesn't start with theQUOTEcharacter, then suck tries to figure out if it is a regular expression, and if it is, it usesregex()on it. This exists so you can tell suck to treat strings like$$$$ MONEY $$$$as non-regex items. πΈ
IF YOU USE BOTHQUOTEandNON_REGEXcharacters on a string, theNON_REGEXcharacter MUST appear FIRST. order matters, bestie, don't play yourself π
GROUP=β this line lets you specify either keep or delete parameters on a group-by-group basis. There are three parts to this line, and each part must be separated by exactly one space. π―- The first part is either
"keep"or"delete". If it's keep, then only articles in that group which match the parameters in the group file get downloaded. If it's delete, articles in that group which match the parameters are not downloaded. - The second part β the group name β is the full group name for articles to check against the group file. The group name may contain an
*as the last character to match multiple groups, eg:"comp.os.linux.*"would matchcomp.os.linux.announce,comp.os.linux.answers, etc.. β - The third part specifies the group file that contains the parameters to check the articles against.
- The first part is either
Note: if you specified a postfix with the -p option, then that postfix gets attached to the name of the file when suck goes looking for it β UNLESS you use the -k option above. π«Ά
GROUP_OVERRIDE_MASTERβ lets you override the default behavior of the master kill file. If this option is in the master kill file, then even if an article is flagged for deletion by the master kill file, it still gets checked against the group files. If the group files say don't delete it, then the article is kept. πTIEBREAKER_DELETEβ overrides the built-in tie-breaker default. The potential exists for a message to get flagged by one group file as kept, and another group file as killed. The built-in default is to then keep the message.TIEBREAKER_DELETEoverrides that and causes the article to be deleted. πUSE_EXTENDED_REGEXβ tells suck to use extended regular expressions instead of standard ones. It can be used in the master killfile, in which case it applies to all killfiles, or in an individual killfile, where it only applies to the parameters that follow it in that killfile. πXOVER_LOG_LONGβ tells suck to format the killfile generated from an Xover killfile so it looks like an article header. The normal output is to just print the Xover line from the server. β¨PROGRAM=β this line lets suck call an external program to check each article. You may specify any arguments in addition to the program name on this line. If this line is in yoursuckkillfile, then all other lines are ignored. Instead, the headers get passed to the external program, and that program decides whether or not to download the article. π§
Here's how it works: suck will fork your program, with stdin and stdout redirected. Suck feeds the headers to your program through stdin, and expects a reply back through stdout. Here's the data flow for each article:
- suck will write an 8 byte long string, which represents the length of the header record, on stdin of the external program. The length is in ascii, is left-aligned, and ends in a newline (example:
"1234 \n"). - suck will then write the header on stdin of the external program.
- suck will wait for a 2 character response code on stdout. This response code is either
"0\n"or"1\n"(NOT BINARY ZERO OR ONE β ASCII ZERO OR ONE). If the return code is zero, suck will download the article; if it's one, suck won't. π₯ - When there are no more articles, the length written down (for step 1) will be zero (again in ascii,
"0 \n"). Suck will then wait for the external program to exit before continuing on. The external program can do any cleanup it needs, then exit.
Note: suck will not continue processing until the external program exits. β³
PERL=β this line lets suck call a perl subroutine to check each article. In order to use this option, you must edit theMakefile, specifically thePERL*options. If thePERL=line is in yoursuckkillfile, all other lines are ignored. Instead, the header is sent to your perl subroutine, and your subroutine determines if the article gets downloaded or not. The parameter on thePERL=line specifies the file name of the perl routine, eg:
PERL=perl_kill.pl
See the sample/perl_kill.pl for a sample perl subroutine. There are a couple key points in this sample: the "package Embed::Persistant;" must be in the perl file β this is so that any variable names you create won't conflict with variable names in suck. In addition, the subroutine you define must be "perl_kill", unless you change the PERL_PACKAGE_SUB define in suck_config.h. Also, your subroutine must return exactly one value, an integer, either 0 or 1. If the subroutine returns 0, then the article is downloaded; otherwise, the article is not downloaded. π
- NOTES: The perl file is only compiled once, before any articles are downloaded. This is to prevent lengthy delays between articles while the perl routine is re-compiled. Also, you must use Perl 5.003 or newer. In addition, you are advised to run
'perl -wc filter'BEFORE using your filter, in order to check for syntax errors and avoid problems. π«Ά
π¦ SUCKXOVER π¦
If the file suckxover exists, then suck uses the XOVER command to get info on the articles and decide whether or not to download each one. Xover files use the same syntax as suckkillfiles, but they only support a subset of the commands.
The following killfile commands are not supported in suckxover files: π«
NRGROUPS:
HEADER:
BODY:
TIEBREAKER_DELETE:
Only the following header lines will be checked: π
Subject:
From:
Message-ID:
References:
The behaviour of the size commands (BODYSIZE>, BODYSIZE<, HILINES, and LOWLINES) is that they specify the total size of the article (not just the body), in bytes or lines, respectively. π
All other parameters are allowed. However, if you use an invalid parameter, it is silently ignored. π€« no error, no warning, just vibes
π« SUCKXOVER and PROGRAM= or PERL= parameters π«
okay bestie, these two lil parameters? they DO work inside a suckxover file, but they act slightly differently than how we described them up above. the key glow-up difference: before suck sends each individual xoverview line over to your program, it sends you the overview.fmt listing that it grabbed from the server. and what even is that? it's a tab-separated line describing the fields in each overview.fmt line. so like, the menu before the meal π
For the PROGRAM= parameter, suck first sends your program an 8 byte long string, which is the length of the overview.fmt. That length is formatted as the lengths above (see nr1 under PROGRAM=). Suck will then send the overview.fmt. After that, the flow is as described above. See sample/killxover_child.c for an example. β¨
For the PERL= parameter, Your program must have two subroutines. The first is perl_overview, which will recieve the overview.fmt, and not return anything. The second subroutine is perl_xover, which will recieve the xoverview line, and return 0 or 1, as described in the PERL= above. See sample/perl_xover.pl for an example. π
πΈ SUCKOTHERMSGS πΈ
If suckothermsgs exists, it must contain lines formatted in one of three ways. The first way is a line containing a Message-ID, with the <> included, eg:
<12345@somehost.com>
This will cause the article with that Message-ID to be retrieved. π«Ά
The second way is to put a group name and article number on a line starting with an !, eg:
!comp.os.linux.announce 1
This will cause that specific article to be downloaded. π
You can also get a group of articles from a group by using the following syntax:
!comp.os.linux.announce 1-10
Whichever method you use, if the article specified exists, it will be downloaded, in addition to any articles retreived via the sucknewsrc. These ways can be used to get a specific article in other groups, or to download an article that was killed. These articles ARE NOT processed through the kill articles routines. not even a little bit. periodt.
π SUCKNODOWNLOAD π
If sucknodownload exists, it must consist of lines contaning a Message-ID, with the <> included, eg:
<12345@somehost.com>
This will cause the article with that Message-ID to NEVER be downloaded. The Message-ID must begin in the first column of the line (no leading spaces). This file overrides suckothermsgs so if an article is in both, it will not be downloaded. the block button but make it email π΅
π POST FILTER π
if the -y post_filter option is specified on the command line in conjunction with any of the batch modes, then suck will call the post filter specified, after downloading the articles, and before batching/posting the articles. The filter is passed the directory where the articles are stored (the -dm option). The filter program is responsible for parsing the contents of the directory. See sample/post_filter.pl for a sample post filter. This option was designed to allow you to add your own host name to the Path: header, but if you need to do anything else to the messages, you can. your filter, your rules, bestie β¨
π¦ FOREIGN LANGUAGE PHRASES π¦
If the -l phrases option is specified or the file /usr/local/lib/suck.phrases (defined in suck_config.h) exists, then suck will load an alternate language phrase file, and use it for all status & error messages, instead of the built-in defaults. The command line overrides the build in default, if both are present. The phrase file contains all messages used by suck, rpost, testhost, and lmove, each on a separate line and enclosed in quotes. To generate a sample phrase file, run make phrases from the command line. This will create "phrases.engl", which is a list of the default phrases. Simply edit this file, changing the english phrases to the language of your choosing, being sure to keep the phrases within the quotes. These phrases may contain variables to print items provided by the program, such as hostname. Variables are designated by %vN% where N is a one-up sequence per phrase. These variables may exist in any order on the phrase line, for example,
"Hello, %v1%, welcome to %v2%" or
"Welcome to %v2%, %v1%"
are both valid phrases. Phrases may contain, \n, \r, or \t to print a newline, carriage return, or tab, respectively. Note that the first line of the phrase file is the current version number. This is checked against the version of suck running, to be sure that the phrases file is the correct version. version check!! no mismatched vibes allowed π
If you modify any of the source code, and add in new phrases, you will need to regenerate phrases.h, so that everything works correctly. To recreate, just run make phrases.h from the command line.
β‘ SIGNAL HANDLING β‘
Suck accepts two signals, defined in suck_config.h. The first signal (default SIGTERM) will cause Suck to finish downloading the current article, batch up whatever articles were downloaded, and exit, without an error. so polite. so graceful. ποΈ
The second signal (default SIGUSR1) will cause suck to use the pause values defined with the -w option (see above). take a lil break, you've earned it π
π₯ EXIT CODES π₯
Suck will exit with the following return codes:
0= success β¨1= no articles available for download. π2= suck got an unexpected answer to a command it issued to the remote server. π3= the-Voption was used. π4= suck was unable to perform NNTP authorization with the remote server. π-1= general error.
π HISTORY π
- Original Author - Tim Smith (unknown address)
- Maintainers -
- March 1995 - Sven Goldt (goldt@math.tu-berlin.de)
- July 1995 - Robert A. Yetman (boby@pixi.com)
π SEE ALSO π
testhost(1), rpost(1), lpost(1).
and that's a wrap on the SUCK(1) page bestie!! this was the SUCK(1) manual page β source and version living in that footer right there, with its date stamp and all π go forth and suck responsibly, you absolute icon πβ¨
π¦ where this page comes from
- debian trixie: suck 4.3.5-5 Β· LicenseRef-public-domain
- ubuntu questing: suck 4.3.5-5
- ubuntu resolute: suck 4.3.5-5build1 Β· LicenseRef-public-domain
- ubuntu stonking: suck 4.3.5-8build1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms