DragonFly On-Line Manual Pages
ypost(1) User Commands ypost(1)
NAME
ypost - Post file(s) to Usenet
SYNOPSIS
ypost [-a, --author=name] [-c, --comment=comment] [-d, --debug] [-f,
--force] [-g, --group=newsgroup] [-l, --line=length] [-m,
--multipart=lines] [-M, --message-id] [-n, --nosort] [-p, --paths] [-P,
--pass=password] [-q, --quiet] [-r, --retry=retries] [-s,
--subject=subject] [-S, --server=address] [-t, --timeout=timeout] [-U,
--user=username] [--sfv=name] [--stdout] [--crc=name] [--help]
[--version] FILE ...
DESCRIPTION
ypost encodes and posts the files specified on the command line to a
Usenet server, which may be specified either on the command line or in
the ypost configuration file, located in the user's home directory and
named .ypostrc (see ypostrc(5)). Options provided on the command line
always take precedence over the options specified in the user's
.ypostrc.
By default, ypost always posts large files as multipart archives in
multiple messages, with each message containing 5000 lines (or about
640k).
OPTIONS
-a, --author=name
When posting messages, use the name specified in the Usenet
From: header field. See the AUTHOR SYNTAX section below for
correct syntax. If the name argument is omitted, ypost will
attempt to prompt the user interactively for this information.
-c, --comment=comment
The Subject: header field of each message will be suffixed by
the specified comment, enclosed in square brackets. If the
comment argument is omitted, ypost will attempt to prompt the
user interactively for this information.
-d, --debug
Write messages useful for debugging to stderr while program is
operating.
-f, --force
By default, ypost will output a summary before posting messages,
describing what will be posted. This option disables that
behavior and posts the messages without confirmation.
-g, --group=newsgroup
Messages will be posted to the specified newsgroup.
-l, --line=length
Create encoded lines of length characters, instead of 128, which
is the default.
-m, --multipart=lines
Split files into multipart posts after lines rather than 5000,
which is the default. Note that this usage differs from the
yencode program, which accepts a file size instead.
-M, --message-id
Output the Message-ID: header when posting (normally not
needed).
-n, --nosort
Do not sort the list of input files before posting.
-p, --paths
Save relative pathnames to files in the encoded data. For
example, running ypost files/new/bigfile.mp3 will by default
store the filename as bigfile.mp3. If the -p option is
specified, the filename will be stored as files/new/bigfile.mp3.
-P, --pass=password
Use password to authenticate with the news server. If password
is omitted, the user will be prompted.
-q, --quiet
Try to avoid writing output while running. The only output that
will occur is error messages.
-r, --retry=retries
Specify the number of retries after which a post attempt will
fail.
-s, --subject=subject
The Subject: header field of each message will be prefixed by
the specified subject, enclosed in square brackets. If the
subject argument is omitted, ypost will attempt to prompt the
user interactively for this information.
-S, --server=address
Post messages through the news server located at the specified
address.
-t, --timeout=seconds
Cause socket operations (such as connects, reads, and writes) to
time out after the specified number of seconds. The default
timeout is 120 seconds.
--sfv=name
Post a yencoded SFV file containing the checksum of each input
file. If name is specified, then that name will be used as a
prefix for the SFV file.
--stdout
Output messages to standard output instead of posting them via
Usenet. This can be used if you want to see what ypost's output
will look like without actually posting anything to Usenet. If
the standard output is a terminal, the encoded data will be
omitted, to keep your screen from filling with garbage and
messing up your terminal.
--crc=name
Post a yencoded CRC file containing the checksum of each input
file. If name is specified, then that name will be used as a
prefix for the CRC file. Note that this CRC file may or may not
comply with the "standard" for what a .crc file is supposed to
contain.
--help Display program help and exit.
--version
Output version number and exit.
QUICKSTART
First create a .ypostrc file in your home directory ("~/.ypostrc")
containing your news server information. This file will keep you from
having to enter the server information on the command line every time
you run the program. Make sure the file is not readable by other users
("chmod 0600 ~/.ypostrc") if it contains a username or password. You
can run "man ypostrc" for the full documentation, but here's an example
that should give you a good start:
# ~/.ypostrc - sample configuration
server = news.example.com # The name of your news server
user = user1234 # Username (if your server requires it)
pass = IloveUnix # Password (if your server requires it)
author = "juser@example.net (Joe User)" # Use this address in the From: line
Now, let's say you have a short video you want to post, and all the
files are in the directory /home/bboy/video:
total 6816
-rw-r--r-- 1 bboy bboy 1776 Mar 14 23:24 shortfilm.nfo
-rw-r--r-- 1 bboy bboy 3072000 Mar 14 23:13 shortfilm.r00
-rw-r--r-- 1 bboy bboy 817510 Mar 14 23:13 shortfilm.r01
-rw-r--r-- 1 bboy bboy 3072000 Mar 14 23:13 shortfilm.rar
To post these files to the newsgroup alt.binaries.test.yenc, and create
an SFV file for them as well, you would run:
ypost --sfv -g alt.binaries.test.yenc /home/bboy/video/*
When you run the command, ypost will output a summary of the messages
it is about to post, before actually posting the messages:
Server: news.example.com
Newsgroup: alt.binaries.test.yenc
Author: juser@example.net (Joe User)
1. "shortfilm.nfo" 1776 yEnc bytes
2. "shortfilm.sfv" 402 yEnc bytes
3. "shortfilm.rar" yEnc (x/5) 3072000 bytes
4. "shortfilm.r00" yEnc (x/5) 3072000 bytes
5. "shortfilm.r01" yEnc (x/2) 817510 bytes
Post 5 files (14 parts)? [y]es, [n]o:
Notice that ypost tries to post your files in a sensible order. .nfo and .sfv files and the like
get posted first, and the .rar file gets posted before the .r00 file, instead of at the end.
SUBJECT LINE FORMAT
The yEnc specification includes subject line formats for single part
and multipart Usenet posts, and strongly recommends their use. ypost
is compliant with the specification, and no facility is included to
override this behavior. However, there are two comment areas allowed
by the specification: one before, and one after the file information.
The comment before the file info may be specified by the -s (--subject)
option, and the comment after the file info may be specified by the -c
(--comment) option. Thus
ypost -s'Test Post' -c'file %f of %F' test.zip test.txt
would post the two files specified (test.zip and test.txt) with the
following subject lines:
[Test Post] "test.txt" 4281 yEnc bytes [file 1 of 2]
[Test Post] "test.zip" yEnc (1/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (2/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (3/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (4/5) 3065891 bytes [file 2 of 2]
[Test Post] "test.zip" yEnc (5/5) 3065891 bytes [file 2 of 2]
The variables used in the preceding example may be included in either
the subject or the comment line, and will be replaced on a per-file
basis with the relevant data. The available variables are:
%p The current part number within the current file.
%P The total number of parts within the current file.
%f The current file number within the overall list of files to
post.
%F The total number of files to be posted.
If you specify either the -s (--subject) or -c (--comment) option
without an argument, ypost will prompt you to enter this information.
AUTHOR SYNTAX
RFC 1036 specifies three permissible forms of user identification.
ypost will enforce use of one of these forms:
juser@example.net
An email address without further explanation.
juser@example.net (Joe User)
An email address followed by comments enclosed by parentheses.
Joe User <juser@example.net>
The user's name followed by an email address enclosed by angle
brackets.
FILES
~/.ypostrc
The configuration file used by ypost if it is present. See
ypostrc(5) for further details.
AUTHOR
Don Moore <bboy@bboy.net>
HOMEPAGE
http://www.yencode.org/
SEE ALSO
ypostrc(5), yencode(1), ydecode(1)
yencode March 2002 ypost(1)