1SM(1)                     InterNetNews Documentation                     SM(1)
2
3
4

NAME

6       sm - Command-line interface to the INN storage manager
7

SYNOPSIS

9       sm [-cdHiqRrSs] [token ...]
10

DESCRIPTION

12       The INN storage manager is the subsystem that stores and keeps track of
13       all of the articles and what storage backend they're in.  All stored
14       articles are assigned a storage API token.  sm is a command-line
15       interface to that storage manager, primarily used to retrieve articles
16       by those tokens but also to perform other operations on the storage
17       subsystem.
18
19       token is the token of an article (the same thing that's returned by
20       grephistory or stored in the history file).  It looks something like:
21
22           @0502000005A4000000010000000000000000@
23
24       Any number of tokens can be given on the command-line for any function
25       other than -s.  If none are, sm normally reads tokens from standard
26       input, one per line.  The default operation is to retrieve and write to
27       standard output the corresponding article for each token given.
28
29       If -s is given, sm instead stores the article given on standard input
30       (in native format, unless -R is given, in which case wire format is
31       expected) using the standard rules of the storage subsystem.  If the
32       article is stored successfully, the token of the article is printed to
33       standard output.  Please note that this does not make any attempt to
34       write a history entry or any overview data, and is therefore only
35       useful under very specific circumstances.
36

OPTIONS

38       -c  Show a clear, decoded form of the storage API token.  Each part of
39           the token is explained, in a human-readable string.  Amongst other
40           elements, this command gives the path to where the corresponding
41           article is supposed to be stored.
42
43       -d, -r
44           Rather than retrieving the specified article, remove the article.
45           This will delete the article out of the news spool and it will not
46           subsequently be retrievable by any part of INN.  It's equivalent to
47           "ctlinnd cancel" except it takes a storage API token instead of a
48           message-ID.
49
50       -H  Retrieve only the headers of the article rather than the entire
51           article.  This option cannot be used with -d, -r, -i, or -S.
52
53       -i  Show the newsgroup name and article number associated with the
54           token rather than the article itself.  Note that for crossposted
55           articles, only the first newsgroup and article number to which the
56           article is associated will be returned.
57
58       -q  Suppress all error messages except usage errors.
59
60       -R  Display the raw article.  This means that line endings won't be
61           converted to native line endings and will be left as CRLF
62           sequences; leading periods will still be escaped for sending over
63           NNTP, and the article will end in a CRLF.CRLF sequence.
64
65           When used with -s, read articles in wire format.
66
67       -S  Write the article to standard output in the format used by rnews
68           spool files.  Multiple articles can be written in this format, and
69           the resulting output can be fed to rnews (on another system, for
70           example) to inject those articles into INN.  This option cannot be
71           used with -d, -r, -H, -i, or -R.
72
73       -s  Store the article given on standard input using the normal storage
74           rules for articles as configured in storage.conf(5).  Print the new
75           token for the message to standard output if it is stored
76           successfully.  If this option is given, no other options except -R
77           and possibly -q should be given.  When -R is given, any number of
78           articles in wire format are read on standard input and stored.
79

EXIT STATUS

81       If all operations were successful, sm exits with status 0.  If an
82       operation on any of the provided tokens fails, sm will exit with status
83       1, even if the operations on other tokens were successful.  In other
84       words, if twenty tokens are fed to "sm -r" on stdin, 19 articles were
85       successfully removed, but the sixth article couldn't be found, sm will
86       still exit with status 1.
87
88       This means that if you need to be sure whether a particular operation
89       succeeded, you should run sm on one token at a time.
90

HISTORY

92       Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews.
93       Rewritten in POD by Russ Allbery <eagle@eyrie.org>.
94

SEE ALSO

96       ctlinnd(8), grephistory(1), history(5), rnews(1), storage.conf(5).
97
98
99
100INN 2.6.5                         2022-01-23                             SM(1)
Impressum