Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Let The Music Play: Join EFF Today

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 196 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

rpost



SYNOPSIS

       rpost  [  hostname  ] [ @filename ] [ -s | -S filename ] [
       -e | -E filename ]  [  -b  batchfile  ]  [  -r  rnews_file
       rnews_path ] [ -p prefix ] [ -d ] [ -U userid ] [ -P pass­
       word ] [ -M ] [ -N port_number ] [ -l phrase_file ] [ -D ]
       [ -T timeout ] [ -u ] [ -n ]

       [  -F  perl_file ] [ -i ] [ -z ] [ -f filter $$o=<outfile>
       filter_arg1 ...  ]


DESCRIPTION

       Rpost will post one or more articles, specified  by  host­
       name.   If  hostname  is not specified, rpost will use the
       environment variable NNTPSERVER.


Generic Options

       @filename

       This option tells rpost to read other options from a  file
       in addition to the command line.

       -D  This  option tells rpost to log various debugging mes­
       sages to "debug.suck", primarily for use by the developer.

       -e|-E filename

       These  options will send all error messages (normally dis­
       played on stderr), to an alternate file.  The  lower  case
       version, -e, will send the error messages to the compiled-
       in default  defined  in  suck_config.h.   The  default  is
       suck.errlog.   The  upper  case  version, -E, requires the
       filename parameter.  All error messages will then be  sent
       to this file.

       -i

       This  option  tells  rpost  to  ignore the 201 (no posting
       allowed) from the welcoming message and to  try  and  post
       anyway.    Some news servers (inn-2.3.1) send 201 no post­
       ing allowed when they are using the AUTHINFO  commands  to
       verify permission to post.

       -l phrase_file

       This  option  tells  rpost  to load in an alternate phrase
       file, instead of using the built-in messages.  This allows
       you to have rpost print phrases in another language, or to
       allow you to customize the messages  without  re-building.
       See  the  "FOREIGN  LANGUAGE  PHRASES"  in suck.1 for more
       details.

       -M
       ber  when  connecting  to the host, instead of the default
       port number, 119.

       -s|-S filename

       These options will send all status messages (normally dis­
       played  on  stdout), to an alternate file.  The lower case
       version, -s, will send the status  messages  to  the  com­
       piled-in default defined in suck_config.h.  The default is
       /dev/null, so no status messages will be  displayed.   The
       upper  case  version, -S, requires the filename parameter.
       All status messages will then be sent to this file.

       -T This option overrides the  compiled-in  TIMEOUT  value.
       This is how long rpost waits for data from the remote host
       before timing out and aborting.

       -u This option tells rpost to send the AUTHINFO USER  com­
       mand immediately upon connect to the remote server, rather
       than wait for a request for authorization.  You must  sup­
       ply the -U and -P options when you use this option.

       -U userid -P password

       These  two  options let you specify a userid and password,
       if your NNTP server requires them.

       -z This option tells rpost to use SSL to communicate  with
       the remote hosts, if SSL was compiled into rpost.


STDIN MODE

       rpost

       rpost hostname

       rpost  reads  one  article  from stdin and sends it to the
       NNTP server. The article must have a header  of  at  least
       two lines, namely Newsgroups: and Subject: and a body (the
       article). Header and body have to be separated by  a  new­
       line.  Rpost does not change the article in any way.

       Rpost  uses  the  POST  command to post your article, just
       like any standard newsreader.  This is  handy  when  using
       SLIP  and PPP, since most providers do not allow any other
       method to post articles (such as nntpsend or innxmit).


BATCH MODE

       rpost hostname -b batchfile -p prefix -d

       This batch mode allows you to give rpost a list  of  arti­
       cles, and have them all posted.
       file can be used to re-run  the  failed  messages  through
       rpost.   NOTE:  duplicate  articles  are NOT considered an
       error for the fail file.

       -d

       If the upload of articles is successful, this option  will
       cause rpost to
        delete the batchfile named in the -b option.

       -p prefix

       If  the batchfile does not contain a full path, but rather
       a partial path, this parameter must be specified.  This is
       useful  when  the  batch file is generated by another pro­
       gram.  For example, Inn lists the path  in  the  out.going
       file  relative  to its base directory /usr/spool/news.  In
       that case just use:

               -p /usr/spool/news


RNEWS MODE

       rpost hostname -r rnews_file rnews_path

       This option allows you to use rnews generated  file(s)  to
       post.  It requires two parameters.

       rnews_file  -  this  is the base name for the rnews files.
       If you have your  rnews  file(s)  called  batch1,  batch2,
       etc., then this argument would be "batch".

       rnews_path - this is the path to the location of the rnews
       files.
              -r batch /usr/tmp/rnews

       -d

       If the upload of all the articles from any  of  the  rnews
       files  is successful, then this option will cause rpost to
       delete that particular rnews file.


FILTER MODES

       -f filter $$o=<outfile> filter_arg1 filter_arg2 ...

       In many cases, each article must be  massaged  before  the
       remote NNTP will accept it.  This option, and the embedded
       perl filter option below, lets you do that.  These filters
       do  not  work  in  STDIN  mode, but in the batch and rnews
       modes from above.  Note that the -f ....  option  must  be
       the  LAST  option, as everything that follows it is passed
       arg1 - The first argument to your  filter  program/script.
       It  most likely will be $$i, which rpost fills in with the
       name of the article that needs to be cleaned up.

       arg2 ... - any additional args needed can be specified.

       Let's clarify this a  bit  with  an  example.   Some  NNTP
       servers don't like to receive articles with the NNTP-Post­
       ing-Host filled in.  Create a short shell script to delete
       this from a file:

       -myscr--------------------------------------------

       #!/bin/sh

       sed -e "/^NNTP-Posting-Host/d" $1 > $2

       -end myscr----------------------------------------

       Then call rpost like this:
              rpost  localhost  -b /usr/spool/news/out.going/pixi
              -f myscr  \$\$o=/tmp/FILTERED_MSG  \$\$i  /tmp/FIL­
              TERED_MSG

       Then,  before  each  article  is uploaded, myscr is called
       like such:
              myscr infilename /tmp/FILTERED_MSG

       After myscr has finished, rpost  uploads  the  cleaned  up
       article,  stored  in /tmp/FILTERED_MSG, to the remote NNTP
       server.


NOTE:

       The $$o and $$i have to be escaped, using either the back­
       slashes  as  above,  or with single quotes, to prevent the
       shell from trying to interpret these as variables.   Fail­
       ure to escape them will result in rpost not working!

       -F perlfilter

       This  option  allows you to use an embedded perl filter to
       filter your articles.  In order to use this, you must edit
       the  Makefile,  and  define the various PERL_ options.  It
       has a couple of  advantages  over  the  -f  option  above.
       Because  it  is embedded perl, there are no forks and exe­
       cls() done, so it should be faster.  Also, you don't  need
       to  worry  about the arguments to the program and escaping
       $$, etc as above.

       Rpost will, when it starts up, load in the perlfilter file
       designated and parse it for syntax errors.  Then, for each
              file name as its sole argument, and must return the
              full  path  to the location of the filtered article
              as a single scalar string (return $outfile).

              3. The subroutine must explicitly close the  output
              file  (containing  the filtered argument) before it
              returns.  This is because  perl  will  only  do  an
              automatic  close  upon  program  completion (in our
              case when rpost exits), or when the file handle  is
              reused  (the  next  time the subroutine is called).
              If the close is not done, then more than likely,  a
              0 byte file will exist when rpost tries to post the
              article, and errors will result.


WARNING:

       Be very careful with what the filter program deletes  from
       the article.  Deleting the wrong line can have bad effects
       later on.  For example, do not delete the MSG-ID line,  as
       this could cause a single message to be posted many times,
       depending on the  configuration  of  both  the  local  and
       remote newserver.


RPOST ARGUMENT FILE

       If  you  specify @filename on the command line, rpost will
       read from filename and parse it for any arguments that you
       wish  to pass to rpost.  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 among more than one
       line.  You may also use comments.  Comments begin with '#'
       and  go  to the end of a line.  All command line arguments
       override arguments in the file.  One  advantage  to  using
       the  file  instead  of the command line, is that you don't
       have to escape any special characters, such as $.

              # Sample Argument file
              -b batch # batch file option
              -M   # use mode reader option


EXIT VALUES

       Rpost returns the following exit values:

              0 = success
              1 = error posting an article
              2 = unable to do NNTP authorization with the remote
              server.
              3  =  unexpected  answer to command when doing NNTP
              authorization.
              -1 = other fatal error.

An undefined database error occurred. SELECT distinct pages.pagepath,pages.pageid FROM pages, page2command WHERE pages.pageid = page2command.pageid AND commandid =


  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.04 Seconds