OSSP CVS Repository

ossp - ossp-pkg/lmtp2nntp/lmtp2nntp.pod 1.1
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/lmtp2nntp/lmtp2nntp.pod 1.1

=pod

=head1 NAME

B<lmtp2nntp> - mail to nntp gateway

=head1 SYNOPSIS

B<lmtp2nntp> 
[B<-p> I<protocol>]
[B<-l> I<logtarget>]
[B<-h> I<host>[I<:port>]]
[B<-m> I<mode>]
[B<-t>]
[B<-v>]
I<newsgroup> 
[I<newsgroup> ...]

=head1 DESCRIPTION

The B<lmtp2nntp> program reads mail from stdin and posts it to one or more
newsgroups using NNTP. It delivers the message immediately or fails.
If queuing is desired it can operate as a LMTP server.

The following options are available:

=over 4

=item B<-p> I<protocol>

Incoming protocol. Default is C<stdin> which means B<lmtp2nntp>
reads the incoming mail from F<stdin> in RFC822 message format and reports errors to F<stderr>.
Alternatively if I<protocol> is C<LMTP>, B<lmtp2nntp> speaks Local Mail
Transport Protocol (LMTP) according to RFC 2033 on F<stdin>/F<stdout>.

=item B<-l> C<stderr>

=item B<-l> C<syslog>[C<:>I<facility>]

=item B<-l> C<file:>I<localfile>

Logging target. This option can be specified more than once. Default is no
logging. Default I<facility> for C<syslog:> is C<lmtp2nntp>.

=item B<-h> I<host>[:<port>]

Hostname or address and optional TCP port of a NNTP service. Unless a port
is specified, getserbyname(nntp) is queried with fallback to 119/tcp. If C<-h>
option is ommited, the environment
variable C<NNTPSERVER> is read, if this is undefined or empty C<news> is
used and if this doesn't resolve, C<localhost> is assumed. This
option can be specified more than once. The program connects to the
services in given order.

=item B<-m> I<mode>

Mode of delivery. Possible values for I<mode> are C<many> (default) and
C<once>. If multiple NNTP servers are given and running in C<many> mode, it
posts to as many servers as it can. Sucessfully posting the message one or
more times returns success. In I<once> mode it stops processing immediately
after the first successful delivery and returns success.

=item B<-t>

Enable LMTP protocol tracing in logfile. When using C<syslog:> these messages
are logged with C<debug> level.

=item B<-v>

Enable verbose processing messages in logfile.  When using C<syslog:> these
messages are logged with C<info> level.

=item I<newsgroup> 

Newsgroup to post the message to. Multiple groups can be specified.
Crosspostings only succeed if delivery to I<all> groups succeed.

=back

=head1 SENDMAIL INTEGRATION

  Mlmtp2nntp, P=/... /*FIXME*/

=head1 EXAMPLE

 $ cat rfc822.message | lmtp2nntp -l /tmp/log -v -h mynews foo.bar

reads rfc822.message and posts it into group "foo.bar" using NNTP service on
host "mynews". Activity is logged to /tmp/log. If posting is
successful, the exit status is 0.

 $ cat rfc822.message | lmtp2nntp -h news1 -h news2 -h news3 foo.bar

reads rfc822.message and posts it into group "foo.bar" using NNTP service on
all hosts "news1", "news2" and "news3". Activtiy is not logged.
If at least one posting is successful, the exit status is 0.

 $ cat rfc822.message | lmtp2nntp -l stderr foo.bar quux.bar test.bar

reads rfc822.message and posts it into groups "foo.bar", "quux.bar" and
"test.bar" using NNTP service on host C<${NNTPSERVER:-news}>. Activity
is logged to stderr. Only if all three crosspostings succeed, the exit
status is 0.

=head1 DIAGNOSTICS

when invoked from command line

 0 = successful execution and delivery
 1 = execution failed
 2 = cannot deliver to any nntpserver

when invoked as LMTP server

 0 = successful execution
 1 = execution failed

delivery status is part of the LMTP protocol

=head1 AUTHOR

 The OSSP Project
 Cable & Wireless Deutschland GmbH
 Thomas Lotterer
 <thomas.lotterer@cw.com>

=cut


CVSTrac 2.0.1