๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78845

INN - RPost - empty file

#78845
From: Eduardo-Sorocaba
Date: Thu, 27 Mar 2008 23:50
81 lines
3457 bytes
Hi,

Trying to use rpost Iยดm getting this:

Using the command "/usr/bin/rpost post.server -b 
/var/spool/news/outgoing/post.server"

result: "Empty file, skipping"

Using the script below, the messages are sent but without body, just headers.

Any help, please?

Thanks

Eduardo.

script:
#!/usr/bin/perl

my $server  = "post.server";
my $tokens  = "/var/spool/news/outgoing/nic.near.net";
my $sm      = "/usr/lib/news/bin/sm";
my $rpost   = "/usr/bin/rpost";
my $errfile = "/var/log/news/suck.errlog";

open TOKENS, "$tokens" or die "Unable to open $tokens";
my @tokens = <TOKENS>;
close TOKENS;

foreach ( @tokens )
{
        my $tok = $_;

        open ARTICLE, "$sm $tok|" or die "Unable to retreive $tok";
        my @article = <ARTICLE>;
        close ARTICLE;

        my %art;
        foreach ( @article )
        {
                $art{'local'} = 1 if (( $_ =~ /^Path:/ ) and
                                      ( $art{'body'} == 0));
                $art{'body'}  = 1 if ( $_ eq "n" );

                if ( ($art{'body'} == 0 ))
                {
                        $art{'Newsgroups'} = $_ if ( $_ =~ /^Newsgroups:/);
                        $art{'From'} = $_ if ( $_ =~ /^From:/);
                        $art{'Subject'} = $_ if ( $_ =~ /^Subject:/);
                        $art{'Message-ID'} = $_ if ( $_ =~ /^Message-ID:/);
                        $art{'References'} = $_ if ( $_ =~ /^References:/);
                        $art{'CT'} = $_ if ( $_ =~ /^Content-Type:/);
                        $art{'References'} = $_ if ( $_ =~ /^References:/);
                        $art{'CTE'} = $_ if ( $_ =~ 
/^Content-Transfer-Encoding:/);
                }

                $art{'body_text'} .= $_ if ( $art{'body'} == 1 );
        }

        my $raw = $art{'From'} . $art{'Subject'} . $art{'Newsgroups'} .
	$art{'Message-ID'} . $art{'References'} . $art{'CT'} .
	$art{'CTE'} . "\n" . $art{'body_text'};

        if ( $art{'local'} == 1 )
        {
                my $rpost_cli = "$rpost $server -E $errfile -S $errfile";
                open RPOST, "|$rpost_cli" or die "Unable to post article 
$art{'Message-ID'}";
                print RPOST $raw;
                close RPOST;
        }
}

-- 
BRA-NET
bra.dnsalias.net
Sorocaba,SP - Brasil

Technical Details
Message-ID: <mn.dce27d83c1871caf.57618@bra.dnsalias.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!newsfeed.datemas.de!news.datemas.de!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <mn.dce27d83c1871caf.57618@bra.dnsalias.net>
Subject: INN - RPost - empty file
Date: Thu, 27 Mar 2008 20:50:07 -0300
From: Eduardo-Sorocaba <eduardo@bra.dnsalias.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!newsfeed.datemas.de!news.datemas.de!not-for-mail
Newsgroups: news.software.nntp
Organization: bra.dnsalias.net
Lines: 81
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.datemas.de
 cPFxjLVYes5xgIMfOtuvOI/eISMFDruMQt/msHo5VlNhusDCuYzLALNrJYTKHfJM2FNf+ji+pq2JFypLKhXXKircKeRCACNF2bsPzsNr/aJYpXinkH1mUGeTG8+yQ0O8oWMrioSBhv6xmOD7cHv4Js/JLSiuAl/zCQmFGNxS69M=
X-Complaints-To: abuse@datemas.de
NNTP-Posting-Date: Thu, 27 Mar 2008 23:51:01 +0000 (UTC)
X-Newsreader: MesNews/1.08.00.01-gb