## ## Copyright (c) 2001 The OSSP Project ## Copyright (c) 2001 Cable & Wireless Deutschland ## ## This file is part of OSSP lmtp2nntp, an LMTP speaking local ## mailer which forwards mails as Usenet news articles via NNTP. ## It can be found at http://www.ossp.org/pkg/lmtp2nntp/. ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License ## as published by the Free Software Foundation; either version ## 2.0 of the License, or (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this file; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ## USA, or contact the OSSP project . ## ## lmtp2nntp.pod: LMTP to NNTP (manual page) ## =pod =head1 NAME B - mail to news gateway =head1 SYNOPSIS B [B<-b> I[I<:port>] [B<-d> I] [B<-g> I] [B<-h> I[I<:port>][,I[I<:port>], ...]] [B<-m> I] [B<-n> I] [B<-s> I] [B<-l> I[:I]] [B<-v>] [B<-w> I] I [I ...] B [B<-i> I] =head1 DESCRIPTION The B program is a LMTP service which is usually invoked by a MTA. Input messages get their headers slightly reformatted to match network news article format. The article is then posted or fed into a NNTP service. Delivery must take place immediately or the transaction fails. A LMTP service relies on the queuing capabilities of its MTA. To support this, the program returns proper delivery status notification which indicates successful completed action, persistent transient failure or permanent failure. The following options are available: =over 4 =item B<-b> I[I<:port>] Bind address and/or port to be used by the LMTP client. If an address is specified but port is omitted the kernel chooses an ephemeral port. If you want to specify a port but no address replace address with 0.0.0.0. If completely omitted, 0.0.0.0:0 is assumed which causes the kernel to choose an address based on routing information and an ephemeral port. =item B<-d> I Possible values for I are C, C or a string in "LLL/D.D.D" format used to fake a LMTP return code. In C mode articles are sent to the NNTP server(s) using POST command. Before posting, a duplicate check using STAT command is issued. In C mode articles are sent to the NNTP server(s) using IHAVE command. Specifying a return code and DSN replaces the post/ feed logic by a noop and assumes the given string must be returned to the LMTP side. The slash is replaced by a space internally. The default is "553/5.7.1" meaning "Requested action not taken: mailbox name not allowed/ Delivery not authorized, message refused". This is useful for debugging LMTP setups without engaging NNTP. Fake mode makes it possible to run without any B<-h> option. However, if B<-h> option is given the NNTP client tries to connect but it's return codes are ignored. =item B<-g> I Possible values for I are C (default), C and C
. In C mode, the Cs specified as command line arguments are ultimate destinations for the received messages. Addresses from envelope and headers are ignored. In C mode the newsgroup(s) are taken from the LMTP envelope, in C
mode the newsgroup(s) are taken from the header. In all modes C header is rewritten. In C and C
mode groups must still be specified as command line arguments. However, in these modes the command line arguments are filters representing allowed groups. Filters can be specified as wildmat's. =item B<-h> I[I<:port>][,I[I<: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 is read, if this is undefined or empty C is used and if this doesn't resolve, C is assumed. This option can be specified more than once and it is possible to specify more than one host/ port per option as a comma-separated list. It is assumed that multiple servers are used to increase the reliability of the news system and to speed up distribution by posting the same article to more than one server. In regard to this program they must provide the same groups and talk to each other. =item B<-m> I "MAIL From:" filter to limit sender addresses. If ommitted, anyone can send mail. The value to be compared includes the angle brackets. Use a PCRE (Perl compatible reguar expression) for I. =item B<-n> I Own FQDN used in LMTP and NNTP protocols. This overrides the nodename returned by uname(3). =item B<-s> I Size limitation on message in bytes. Default is 8388608 (8M). Values below 64 are considered unacceptable small. =item B<-v> Print version information. =item B<-w> I Specify the time the NNTP client waits for the initial connect to complete and the time to wait for every server's response. Value is given in seconds and must be greater than or equal to 1 second. The default is OS dependent for the connect and a 3 second timeout waiting for a server's response. =item I [I ...] Newsgroup to post the message to or filter, depending on groupmode. Multiple groups can be specified. Crosspostings succeed if delivery to I group succeeds. B =item B<-i> I Message id of MTA (for logging purposes only). =back =head1 SENDMAIL INTEGRATION t.virtusertable # mail to news gateway posting+*@first.gateway.example %2@lmtp2nntp t.mailertable # mail to news gateway lmtp2nntp lmtp2nntp:second.gateway.example sendmail.m4 dnl # Mailer: LMTP2NNTP (mail to news gateway) define(`LMTP2NNTP_MAILER_PATH', `confMYBINDIR/lmtp2nntp') define(`LMTP2NNTP_MAILER_MAX', `100000') define(`LMTP2NNTP_MAILER_DELIVERYMODE', `post') define(`LMTP2NNTP_MAILER_GROUPMODE', `envelope') define(`LMTP2NNTP_MAILER_ARGS', `-t confMYVARDIR/lmtp2nntp.log') define(`LMTP2NNTP_MAILER_GROUPS', `alt.test.\* alt.binaries.test') MAILER(lmtp2nntp) =head1 DIAGNOSTICS when invoked as LMTP server 0 = successful execution 1 = execution failed Returning proper delivery status notification is part of the LMTP protocol. =head1 STANDARDS =over 4 =item RFC0821 Simple Mail Transfer Protocol. J. Postel. Aug-01-1982. (Format: TXT=124482 bytes) (Obsoletes RFC0788 ) (Obsoleted by RFC2821) (Also STD0010) (Status: STANDARD ) =item RFC0822 Standard for the format of ARPA Internet text messages. D. Crocker. Aug-13-1982. (Format: TXT=109200 bytes) (Obsoletes RFC0733) (Obsoleted by RFC2822) (Updated by RFC1123, RFC1138, RFC1148, RFC1327, RFC2156) (Also STD0011) (Status: STANDARD) =item RFC0977 Network News Transfer Protocol. B. Kantor, P. Lapsley. Feb-01-1986. (Format: TXT=55062 bytes) (Status: PROPOSED STANDARD) =item RFC1035 Domain names - implementation and specification. P.V. Mockapetris. Nov-01-1987. (Format: TXT=125626 bytes) (Obsoletes RFC0973, RFC0882, RFC0883) (Updated by RFC1101, RFC1183, RFC1348, RFC1876, RFC1982, RFC1995, RFC1996, RFC2065, RFC2136, RFC2181, RFC2137, RFC2308, RFC2535, RFC2845) (Also STD0013) (Status: STANDARD) =item RFC1652 SMTP Service Extension for 8bit-MIMEtransport. J. Klensin, N. Freed, M. Rose, E. Stefferud, D. Crocker. July 1994. (Format: TXT=11842 bytes) (Obsoletes RFC1426) (Status: DRAFT STANDARD) =item RFC1854 SMTP Service Extension for Command Pipelining. N. Freed. October 1995. (Format: TXT=14097 bytes) (Obsoleted by RFC2197) (Status: PROPOSED STANDARD) =item RFC1893 Enhanced Mail System Status Codes. G. Vaudreuil. January 1996. (Format: TXT=28218 bytes) (Status: PROPOSED STANDARD) =item RFC1894 An Extensible Message Format for Delivery Status Notifications. K. Moore, G. Vaudreuil. January 1996. (Format: TXT=77462 bytes) (Updated by RFC2852) (Status: PROPOSED STANDARD) =item RFC2034 SMTP Service Extension for Returning Enhanced Error Codes. N. Freed. October 1996. (Format: TXT=10460 bytes) (Status: PROPOSED STANDARD) =item RFC2606 Reserved Top Level DNS Names. D. Eastlake, A. Panitz. June 1999. (Format: TXT=8008 bytes) (Also BCP0032) (Status: BEST CURRENT PRACTICE) =item RFC2821 Simple Mail Transfer Protocol. J. Klensin, Editor. April 2001. (Format: TXT=192504 bytes) (Obsoletes RFC0821, RFC0974, RFC1869) (Status: PROPOSED STANDARD) =item RFC2980 Common NNTP Extensions. S. Barber. October 2000. (Format: TXT=57165 bytes) (Status: INFORMATIONAL) =back =head1 AUTHOR The OSSP Project Cable & Wireless Deutschland GmbH Thomas Lotterer =cut