---
name: "uqwk"
section: "1"
platform: "linux"
package: "uqwk"
version: "1.8-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/uqwk"
---

# uqwk(1)

Collect news and mail into packet for offline reading

## NAME

uqwk - Collect news and mail into packet for offline reading

## SYNOPSIS

**uqwk** \[options\]

## DESCRIPTION

**uqwk** is a program which collects all a user's unread mail or news and formats it into a packet for offline reading, saving telephone and connect charges.  QWK, Simple Offline Usenet Packet (SOUP), and ZipNews formats are supported.

**uqwk** also accepts reply packets, so replies can be mailed or posted, depending whether the message is marked private (email) or public (news).

**uqwk** also supports a small offline command language, so the contents of the user's .newsrc file can be viewed and manipulated offline.

## OPTIONS

- **+m**

  Do mail. **uqwk** will process all mail in the user's mail spool file and convert it into an offline packet.  This is the default.

- **-m**

  Don't do mail.

- **+n**

  Do news.  Using the user's .newsrc file and the news system's active file, **uqwk** will collect all unread news articles in all subscribed newsgroups into the packet.  This can generate a large number of messages and large packet files.

- **-n**

  Don't do news.  This is the default.

- **+h**

  Include headers.  Since the QWK specification places limits on the sizes of certain header fields such as To:, From:, and Subject:, **uqwk** can include all message and article headers in the body of the message so all fields are visible.  This is the default.  (This switch only applies to the QWK packet format.)

- **-h**

  Do not include headers in messages.  (QWK only.)

- **+e**

  Include an entry for every subscribed newsgroup in the CONTROL.DAT file. (QWK only).

- **-e**

  Do not include an entry in CONTROL.DAT for empty newsgroups.  This is the default.  (QWK only.)

- **-p**

  Print options. **uqwk** will examine all appropriate environment variables and command line options, print the values of all run-time options, then exit.  This is useful to see what **uqwk** thinks it is going to do before you actually run it.

- **+r**

  Read only.  Normally, **uqwk** will empty the user's mail spool file and update the user's .newsrc file to reflect the fact that mail and news have been read.  If this switch is specified, **uqwk** will not touch these files.  This is useful for testing.

- **-r**

  Do not execute in read-only mode.  This is the default.

- **+L**

  Operate in SOUP (also known as HDPF or SLNP) mode.  The files comprising a Simple Offline Usenet Packet (SOUP), specifically, AREAS and \*.MSG, will be created instead of a QWK packet.  The reply file, if any, will be interpreted as an SOUP "replies" file instead of a QWK reply packet.

- **-L**

  Do not operate in SOUP mode.  This is the default.

- **+z**

  Operate in ZipNews mode.  The files comprising a ZipNews news packet, specifically, "user.JN", "user.NWS", and "user.IDX", will be created instead of a QWK packet.

- **-z**

  Do not operate in ZipNews mode.  This is the default.

- **+x**

  Honor Xref header lines in news articles.  When this switch is in effect, **uqwk** will only pack a crossposted article in the first newsgroup in which it is encountered.  This can reduce the size of the packet but may introduce unexpected behavior on the part of the offline reader.

- **-x**

  Do not honor Xref lines.  This is the default.

- **+W**

  Activate the Blue Wave kludge.  The Blue Wave QWK reader does not like the personal.ndx file that **uqwk** creates by default.  If this switch is specified **uqwk** will create a regular ???.ndx file that Blue Wave likes. (QWK only.)

- **-W**

  Do not activate the Blue Wave kludge.  This is the default.

- **+X**

  Operate in expert QWK mode.  The QWK header is ignored and all header lines are taken from the body of the message.  In the hands of an expert, this permits the creation of RFC822 compliant mail messages and RFC1036 compliant news articles using QWK readers, which is difficult or impossible otherwise in many cases.  This is intended for people who really know what they're doing.  (QWK only.)

- **-X**

  Do not operate in expert QWK mode.  This is the default.

- **-M*maildir***

  Look in the directory *maildir* for the mail spool file.  The default is /var/spool/mail.

- **-f*mailfile***

  Look for mail in the file *mailfile*.  The default is a file with the same name as the user's login name in *maildir*. This switch overrides the **-M** switch.

- **-u*username***

  By default **uqwk** uses the getpwuid() system call to determine the proper user name to use.  This switch overrides the results of that call.

- **-H*homedir***

  By default, **uqwk** uses the getpwuid() system call to determine the user's home directory.  The home directory is where the files comprising the offline packet will be created.  It is also where **uqwk** looks for the .newsrc file.  This switch may be used to override the results of the getpwuid() call.

- **-b*bbsname***

  Specify the BBS Name to be entered into the QWK packet.  The default is "unknown BBS".  (QWK only.)

- **-c*city***

  Specify the BBS City to be entered into the QWK packet.  The default is "Anytown, USA".  (QWK only.)

- **-P*phone***

  Specify the BBS Phone Number to be entered into the QWK packet. The default is "555-1212".  (QWK only.)

- **-s*sysop***

  Specify the BBS Sysop Name to be entered into the QWK packet.  The default is "Joe Sysop".  (QWK only.)

- **-i*bbsid***

  Specify the BBS ID to be entered into the QWK packet.  The BBS ID is important since it will be checked against the BBS ID string in any incoming reply packets.  If the two do not match, the reply packet will not be processed.  The BBS ID consists of an integer, a comma, and a string of less than nine characters, with no spaces. The default is "0,SOMEBBS".  (QWK only.)

- **-a*activefile***

  Use *activefile* for the list of all available newsgroups and article numbers.  The default is /var/lib/news/active.  This option is ignored if articles are being obtained from a news server using NNTP.

- **-N*newsrcfile***

  Use *newsrcfile* for the list of all newsgroups to which the user is subscribed and the list of article numbers which have been read.  The default is a file called ".newsrc" in the user's home directory.

- **+w**

  Interpret the *newsrcfile* as a Waffle "join" file instead of a regular Unix .newsrc.

- **-w**

  Do not interpret the *newsrcfile* as a Waffle "join" file. This is the default.

- **-D*ngfile***

  Process newsgroups in the order specified in *ngfile*.  *ngfile* is expected to contain one newsgroup name per line.

- **-S*newsdir***

  Look for news articles in the directory *newsdir*.  The default is /var/spool/news.  This option is ignored if articles are being obtained from a news server using NNTP.

- **-B*maxblocks***

  Stop processing news articles if the size of the offline packet exceeds *maxblocks* 128-byte blocks. This is useful since large amounts of unread news can create large packets.  Use a *maxblocks* value of zero to suppress this check.  The default is 4000 blocks (half a megabyte).

- **-t*tablefile***

  Translate newsgroup names as specified in *tablefile*.  Each line in *tablefile* is expected to have two fields separated by white space:  The old name of the newsgroup and the name to which it will be translated.  (QWK only.)

- **-l*len***

  Truncate the names of newsgroups to *len* characters.  Some offline readers cannot handle long newsgroup names.  Newsgroup names are truncated after having been translated.  The default is 15 characters.  Specify a value of zero for unlimited newsgroup name lengths.  (QWK only.)

- **-R*replyfile***

  Process *replyfile* as a reply packet.  Messages and articles created by the offline reader must be uploaded as a reply packet and then processed by this switch to be mailed or posted.  If operating in SOUP mode, this file should be the REPLIES file. **uqwk** will remove *replyfile* when it has been processed unless it is running in read-only mode.  If operating in ZipNews mode, this switch should specify the **directory** in which the ZipNews reply files reside.

- **-d*hostname***

  Use the specified *hostname* when processing ZipNews reply packets. This should be the fully-qualified domain name of the Unix host.  The default is "nowhere".

- **-U*sumfile***

  Operate in "summary" mode.  Instead of packing articles, **uqwk** creates a summary file, *sumfile*, which consists of the newsgroup name, article number, and subject line of each unread article.  All summarized articles are marked as read.

- **-E*selfile***

  Operate in "selection" mode.  Instead of using the .newsrc file to determine which articles to pack, **uqwk** reads *selfile*, a file in the same format as the summary file.  (The actual subjects are optional in *selfile*.)  The idea is that a summary may be created by using -U, downloaded, edited or processed by additional software to select desired articles, uploaded, and fed to the -E switch for offline article selection.

- Most of the run-time options can also be controlled by

  ## ENVIRONMENT VARIABLES

environment variables.  If an option is specified by both an environment variable and a command-line option, the command-line option is honored.

- **UQ\_DO\_MAIL**

  Determines whether or not to process mail.  Should be set to "1" (do mail) or "0" (don't do mail).

- **UQ\_DO\_NEWS**

  Determines whether or not to process news.  Should be set to "1" (do news) or "0" (don't do news).

- **UQ\_INC\_HDRS**

  Determines whether or not to include headers in messages. Should be set to "1" (include headers) or "0" (don't include headers).

- **UQ\_EVERY\_MODE**

  Determines whether or not to include an entry in CONTROL.DAT for empty newsgroups.  Should be set to "1" (include empty groups) or "0" (don't include empty groups).

- **UQ\_PRT\_OPTS**

  Determines whether or not to just print the values of run-time options and stop.  Should be set to "1" (print options) or "0" (don't print options).

- **UQ\_READ\_ONLY**

  Determines whether or not to run in read-only mode.  Should be set to "1" (read-only) or "0" (not read-only).

- **UQ\_WAF\_MODE**

  Determines whether the .newsrc file should be interpreted as a Waffle "join" file.  Should be set to "0" (normal) or "1" (Waffle mode).

- **UQ\_SOUP\_MODE**

  Determines whether or not to run in SOUP mode.  Should be set to "0" (don't run in SOUP mode) or "1" (run in SOUP mode).

- **UQ\_ZIP\_MODE**

  Determines whether or not to run in ZipNews mode.  Should be set to "0" (don't run in ZipNews mode) or "1" (run in ZipNews mode).

- **UQ\_XRF\_MODE**

  Determines whether or not to honor Xref lines.  Should be set to "0" (do not honor Xref lines) or "1" (honor Xref lines).

- **UQ\_BW\_KLUDGE**

  Determines whether or not to activate the Blue Wave kludge.  Should be set to "0" (do not activate the Blue Wave kludge) or "1" (activate the Blue Wave kludge).

- **UQ\_XPRT\_MODE**

  Determines whether or not to operate in QWK expert mode.  Should be set to "0" (do not run in expert mode) or "1" (run in expert mode).

- **UQ\_MAIL\_DIR**

  Specifies the directory where the mail spool file resides.

- **UQ\_MAIL\_FILE**

  Specifies the mail spool file.

- **UQ\_USER\_NAME**

  Specifies the username of the person running **uqwk.**

- **UQ\_HOME\_DIR**

  Specifies the home directory, where the packet files will be created, and where **uqwk** expects to find the .newsrc file.

- **UQ\_BBS\_NAME**

  Specifies the BBS name to be entered into the QWK packet.

- **UQ\_BBS\_CITY**

  Specifies the BBS city to be entered into the QWK packet.

- **UQ\_BBS\_PHONE**

  Specifies the BBS phone number to be entered into the QWK packet.

- **UQ\_BBS\_SYSOP**

  Specifies the BBS sysop name to be entered into the QWK packet.

- **UQ\_BBS\_ID**

  Specifies the BBS ID to be entered into the QWK packet.

- **UQ\_ACT\_FILE**

  Specifies the name of the news system's active file.

- **UQ\_NRC\_FILE**

  Specifies the name of the user's .newsrc file.

- **UQ\_NG\_FILE**

  Specifies the name of the desired newsgroups file.

- **UQ\_MAX\_BLKS**

  Specifies the maximum size of the offline packet in 128-byte blocks.

- **UQ\_TRN\_FILE**

  Specifies the name of the newsgroup name translation table.

- **UQ\_GRP\_LEN**

  Specifies the maximum length of newsgroup names.

- **UQ\_REP\_FILE**

  Specifies the name of the reply packet, if any.

- **UQ\_HOST\_NAME**

  Specifies the host name for ZipNews replies.

- **UQ\_SUM\_FILE**

  Specifies the name of the summary file, if any.  Also causes **uqwk** to execute in summary mode.

- **UQ\_SEL\_FILE**

  Specifies the name of the selection file, if any.  Also causes **uqwk** to execute in selection mode.

## COMMAND LANGUAGE

If, while processing a reply packet, **uqwk** encounters a message to the username "UQWK", the body of the message will be interpreted as a small command language, used to display newsgroup names and subscribe or unsubscribe to newsgroups.  The results of the execution of the commands will be mailed back to the originating user.

This is what the command language looks like:

- **HELP**

  List all the available commands.

- **SUBSCRIBE newsgroup**

  Subscribe to the named newsgroup.

- **UNSUBSCRIBE newsgroup**

  Unsubscribe from the named newsgroup.  UNSUBSCRIBE ALL may be used to unsubscribe from all newsgroups.  UNSUBSCRIBE ALL is also the only way to create a new .newsrc if it does not already exist.

- **CATCHUP newsgroup**

  Mark all articles in the named newsgroup as read.

- **GROUPS**

  List all newsgroups to which the user is currently subscribed.

- **ALLGROUPS**

  List all the available newsgroups and the number of articles in each one.

- **SHELL command**

  Execute the specified shell command.  Anything written to standard output will be mailed back to the originating user.

## NOTES

In QWK mode, it is possible to send mail to long email addresses by including, as the first thing in the body of the message, a line of the form:

To: user@site.com

(The space after the colon is important.)

## BUGS

The handling of MMDF mail files is kludgy and should be fixed.

In QWK mode, if the .newsrc file is modified significantly between the time a packet is created and the time replies to that packet are processed, it is possible that articles may be posted to the wrong newsgroup.  If you use **uqwk** along with a conventional online newsreader, it may be wise to maintain a separate .newsrc file strictly for **uqwk.**

**uqwk** does not do mail locking.  If new mail arrives while **uqwk** is packing mail, the new message may be lost.  If you're worried about this, either make a copy of your mail spool before running **uqwk,** or run **uqwk** in read-only mode and erase your mail spool manually when you think it is safe.

**uqwk** does not support the ZipNews offline commands.  To perform offline configuration using **uqwk,** send mail to the username "UQWK" in the format described in the COMMAND LANGUAGE section above.

## SEE ALSO

**[mail(1)](/mail/1.md),** **inews(8)**

## ACKNOWLEDGEMENTS

**uqwk** was inspired by a conversation with Harry Lockwood (lockwood@world.std.com).

QWK format was designed by Mark "Sparky" Herring (mark.herring@nashville.com). The creator of SOUP is Rhys Weatherley (rhys@cs.uq.oz.au). The creator of ZipNews is Jack Kilday (jkilday@nlbbs.com).

Thanks to Patrick Y. Lee (patlee@panix.com) for the QWK documentation. Many thanks also to the beta-testers:  Karl J. Vesterling (kjv@exucom.com) and Brian J. Coan (brian@igc.apc.org).

Many thanks to Ken Whedbee (kcw@grumpy.ksc.nasa.gov) for the NNTP modifications.

Many other people, too numerous to list here, contributed bug fixes and suggestions for improvement.

## AUTHOR

steve belczyk, steve1@genesis.nred.ma.us, seb3@gte.com.

Copyright (C) 1993-1994 by steve belczyk. Permission to use, copy, modify and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  This software is provided "as is" without expressed or implied warranty.
