Section: Maintenance Commands (8)Updated: Harold TayLocal indexUp
snmail - mail-to-news filter
reads a single email message on standard input, and writes the
converted message to standard output.
This output is suitable for feeding to
does these conversions:
If the first line is a UUCP
line, it is silently discarded;
line is added with the value of
and other existing
lines are removed;
line is created from all
lines, which are removed;
all header lines are unfolded;
if no message ID exists, one is created;
message IDs in all
lines are collected into a single
line; all lines are rewritten to end in CRLF; and a lone
on a line is written at the end of the message.
will accept and pass on messages with invalid header fields.
is meant to be run from a
file (if you're using sendmail or similar) or from a
file (if you're using qmail).
may write status or error messages to standard error.
Pipe output to
directly, do not write to standard output. This is so the exit status
is not lost in a shell pipeline. If you use this flag, it is also a
good idea to also use
to check if article already exists).
also accepts options intended for
and these are passed on uninterpreted.
is the prefix of the newsgroup; if not specified, it defaults to
(note the trailing
may not begin with a
(dot) but it may be empty.
completes the newsgroup name; if not specified, it is the local part
of the address in the
line if it exists and isn't empty; otherwise it is the local part of
the messages' first
So if the message originated from the list
then the default newsgroup becomes
may be empty if
You may want to have a file
to deny posting from all and sundry, to prevent the mailing list
newsgroup from being contaminated.
may contain uppercase characters; these are converted to lower case.
There are two ways of forwarding mail to the sn news spool:
directly from a user's mail address; or forwarded to a central
address and then invoking
The central concern here is permissions; while anyone can run
not everyone may store mail in the spool. Mail setups vary a lot,
so basically you're on your own here.
If this is set and is not empty, the value is used in place of
the default news spool directory.
was specified, determines where to look for
before looking in /usr/sbin.
exits 0 if the message was successfully converted and written,
if the message ID already exists in the ID database and the message
was not stored or converted.
exits with 1 on usage error, 2 on operational error, 3 if the
mail message wasn't in the proper format.