View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ulrich Pfeifer > NNML > nnmirror


Annotate this POD


Open  0
View/Report Bugs


nnmirror - update an nntp server with respect to another server


nnmirror [-fhost hostname] [-thost hostname] [-fport port] [-tport port] [-fuser user] [-fpass passwd] [-tuser user] [-tpass passwd] [-date yymmdd] [-time hhmmss] [-reverse] [-only regexp] [-ignore regexp] [-group group expression] ...


Nnmirror connects a FROM and a TO server using Net::NNTP. It asks the FROM server for new articles using the NEWNEWS command. For each returned message-id, the TO server is asked using IHAVE. If TO wants the article, it is fetched from FROM and forwarded to TO.

With respect to the configuration, the "normal" oeration is polling from a remote server. It you specify -reverse the roles of the are reversed and an upload is perlformed. For uploading to a real NNTP server you should use the -only regexp option with an rexexp, which matches the message ids your system generates.

The date/time for the NEWNEWS command defaults to the current time minus one day.

After connecting the servers, an AUTHHINFO request is send if the options -fpasswd or -tpasswd are given.


Assuming you are at your linux box 'hobbit' at home. Your box in the office is called 'sun44', your NNTP-Server 'news'. On 'sun44' you have a NNML server running on port 3000 with user 'lwall' passwd 'foo'. On your linux box, you run the NNML server at port 2000 without authorisation.

Fetch mail from office

  nnmirror -fhost sun44 -fport 3000 -fuser lwall -fpasswd foo \
           -thost localhost -fpasswd '' -tport 2000

Write back the carbon copies you generated

  nnmirror -fhost sun44 -fport 3000 -fuser lwall -fpasswd foo \
           -thost localhost -fpasswd '' -tport 2000 \
           -reverse -only /hhobbit/

Get some news from the NNTP server

  nnmirror -fhost news -fport 119 -fpasswd '' \
           -thost localhost -fpasswd '' -tport 2000 \
           -group comp.lang.perl.* -group \!*.misc

Forward your postings

  nnmirror -fhost news -fport 119 -fpasswd '' \
           -thost localhost -fpasswd '' -tport 2000 \
           -reverse -only /hobbit/

For real use, you may better set the right defaults during configuration and only give the passwords n the command line.


Ulrich Pfeifer <>


close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';

syntax highlighting: