lmtp2nntp(8)

NAME
OSSP lmtp2nntp - mail to news gateway

SYNOPSIS
lmtp2nntp [-C childsmax] [-D] [-K] [-P pidfile] [-V] [-a addr/mask[,addr/mask[,...]] [-b addr[:port]|"-"|path[:perms]] [-c addr[:port]] [-d addr[:port][,addr[:port], ...]] [-g groupmode] [-h header:<value>] [-l level[:logfile]] [-m mailfrom] [-n nodename] [-o operationmode] [-r restrictheader] [-s size] [-t name=sec[,name=sec[,...]] [-u uid] [-v] newsgroup [newsgroup ...]

DESCRIPTION
The OSSP lmtp2nntp program is an LMTP service for use in conjunction with an MTA (like Sendmail), providing a reliable real-time mail to news gateway. Input messages get their headers slightly reformatted to match Usenet news article format. The article is then posted or feeded into a remote NNTP service (like INN). Delivery must take place immediately or the transaction fails. OSSP lmtp2nntp relies on the queuing capabilities of the MTA in order to provide a fully reliable service. For this the program returns proper delivery status notification which indicates successful completed action, persistent transient failure or permanent failure.

The following command line options and arguments are available: Header with value to to be inserted into message before delivery. This option can be specified more than once. Useful for specifiying an moderator Email address to all outgoing news messages by applying an "Approved:" header. Childs the daemon spawns at maximum. Default is 10. Daemonize program and detach from current terminal. Kill the daemon. After processing this option the program is terminated so this option effectivly renders most other options invalid not including specification of a pidfile and logging. The pid must be listed in pidfile. Pidfile to remember the process ID when running as or killing the daemon. Care must be taken when using relative path names as daemonizing changes the current working directory to '/'. Very verbose logging. This means logging is unbuffered. Access control list specifying TCP INET addresses and masks where incoming LMTP connections are accepted from. This option can be specified more than once and it is possible to specify more than one addr/ mask per option as a comma-separated list. Omitting a mask defaults to a host comparison. The mask is a CIDR style bitmask where /0 means no comparison and enforces a match. Omitting the wholly option defaults to 0.0.0.0/0 which allows access from everywhere. It is possible to specify both inclusive and exclusive addresses, the latter have to prefixed with an exclamation mark. In order to pass the ACL a client must match any inclusion and not match any exclusion. If you do not specify any inclusions a fake inclusion of 0.0.0.0/0 is appended internally. Any addr can be a name to be resolved first. Bind address accepting incoming LMTP connections. Supported are ""-"" for stdio, path[:perms] for Unix Domain socket with optional chmod-like permissions and addr[:port] for TCP INET socket. Omitting this option defaults to stdio. The path for a UNIX domain socket must start with a slash. The addr can be a name to be resolved first. Client connections for outgoing NNTP communication bind to this address. 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 all zeroes. 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. The addr can be a name to be resolved first. Destination 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 "-d" option is ommited, the environment variable "NNTPSERVER" is read, if this is undefined or empty "news" is used and if this doesn't resolve, "localhost" 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. Any addr can be a name to be resolved first. 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. Possible values for groupmode are "arg" (default), "envelope" and "header". In "arg" mode, the "newsgroup"s specified as command line arguments are ultimate destinations for the received messages. Addresses from envelope and headers are ignored. In "envelope" mode the newsgroup(s) are taken from the LMTP envelope, in "header" mode the newsgroup(s) are taken from the header. In all modes "Newsgroups:" header is rewritten. In "envelope" and "header" 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. The level measures the degree and importance of output and can be any of PANIC, CRITICAL, ERROR, WARNING, NOTICE, INFO, TRACE or DEBUG. The recommended level for daily operations is NOTICE. The default name for logfile is "logfile". This program is using the logging library (l2) which is currently under development. An early access snapshot with limited functionality has been included. Currently the common denominator of usage between lmtp2nntp and l2 is to use logging into a file only. Note that this will change soon as during integration of l2 into lmtp2nntp logging channels for local syslog and a SMTP client were already finished and IRC and NNTP clients are under development. "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 mailfrom. Own FQDN used in LMTP and NNTP protocols. This overrides the nodename returned by uname(3). Possible values for operationmode are "post", "feed" or a string in "LLL/D.D.D" format used to fake a LMTP return code. In "post" mode articles are sent to the NNTP server(s) using POST command. Before posting, a duplicate check using STAT command is issued. In "feed" 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 -d option. However, if -d option is given the NNTP client tries to connect but it's return codes are ignored. Restricted headers. Messages with a matching restrictheader are rejected. If ommitted no restrictions apply. Matching is done before -h headers are appended. Use a PCRE (Perl compatible reguar expression) for restrictheader. Size limitation on message in bytes. Default is 8388608 (8M). Values below 64 are considered unacceptable small. Timeout for various actions. Possible names are "lmtp" for any LMTP and "nntp" for any NNTP actions. More granular actions can be specified according to the following table, which also lists the system defaults. Setting sec to zero means to wait infinite. Note that LMTP timeouts only apply to socket operations, stdio always waits infinite.

    lmtp:accept  = 0
    lmtp:read    = 10
    lmtp:write   = 10
    nntp:connect = 360
    nntp:read    = 60
    nntp:write   = 60
UID or login name to resolve to a UID to be set for program execution. Print version information. Newsgroup to post the message to or filter, depending on groupmode. Multiple groups can be specified. Crosspostings succeed if delivery to any group succeeds.

SIGNALS
Sending a USR1 signal to the program will flush the logging stream.

DIAGNOSTICS
If invoked it returns 0 on successful execution (not neccessarily meaning successful delivery!) or 1 on failed execution. Returning proper delivery status notification is part of the LMTP protocol.

STANDARDS
Simple Mail Transfer Protocol. J. Postel. Aug-01-1982. (Format: TXT=124482 bytes) (Obsoletes RFC0788 ) (Obsoleted by RFC2821) (Also STD0010) (Status: STANDARD ) 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) Network News Transfer Protocol. B. Kantor, P. Lapsley. Feb-01-1986. (Format: TXT=55062 bytes) (Status: PROPOSED STANDARD) 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) 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) SMTP Service Extension for Command Pipelining. N. Freed. October 1995. (Format: TXT=14097 bytes) (Obsoleted by RFC2197) (Status: PROPOSED STANDARD) Enhanced Mail System Status Codes. G. Vaudreuil. January 1996. (Format: TXT=28218 bytes) (Status: PROPOSED STANDARD) An Extensible Message Format for Delivery Status Notifications. K. Moore, G. Vaudreuil. January 1996. (Format: TXT=77462 bytes) (Updated by RFC2852) (Status: PROPOSED STANDARD) SMTP Service Extension for Returning Enhanced Error Codes. N. Freed. October 1996. (Format: TXT=10460 bytes) (Status: PROPOSED STANDARD) Reserved Top Level DNS Names. D. Eastlake, A. Panitz. June 1999. (Format: TXT=8008 bytes) (Also BCP0032) (Status: BEST CURRENT PRACTICE) Simple Mail Transfer Protocol. J. Klensin, Editor. April 2001. (Format: TXT=192504 bytes) (Obsoletes RFC0821, RFC0974, RFC1869) (Status: PROPOSED STANDARD) Common NNTP Extensions. S. Barber. October 2000. (Format: TXT=57165 bytes) (Status: INFORMATIONAL)