Index: ossp-pkg/lmtp2nntp/AUTHORS RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/AUTHORS,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/AUTHORS,v' 2>/dev/null --- AUTHORS 2001/09/11 06:43:13 1.2 +++ AUTHORS 2001/09/13 13:45:12 1.3 @@ -1,11 +1,18 @@ + _ _ ____ _ + | |_ __ ___ | |_ _ __|___ \ _ __ _ __ | |_ _ __ + | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ + | | | | | | | |_| |_) / __/| | | | | | | |_| |_) | + |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ + |_| |_| + + OSSP lmtp2nntp - Mail to News Gateway + AUTHORS - ======= This is a list of authors who have written or edited major parts of the OSSP lmtp2nntp sources. Ralf S. Engelschall Thomas Lotterer - Michael Schloh Index: ossp-pkg/lmtp2nntp/INSTALL RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/INSTALL,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/INSTALL,v' 2>/dev/null --- INSTALL 2001/09/13 12:57:49 1.5 +++ INSTALL 2001/09/13 13:45:12 1.6 @@ -1,67 +1,120 @@ - -Sendmail Integration -==================== - -Create an cf/mailer/lmtp2nntp.m4 files with the following contents: -______________________________________________________________________ - -PUSHDIVERT(-1) -_DEFIFNOT(`LMTP2NNTP_MAILER_PATH', `/usr/local/bin/lmtp2nntp') -_DEFIFNOT(`LMTP2NNTP_MAILER_FLAGS', `mDFMuXz') -_DEFIFNOT(`LMTP2NNTP_MAILER_ARGS', `') -_DEFIFNOT(`LMTP2NNTP_MAILER_BINDADDR', '0.0.0.0') -_DEFIFNOT(`LMTP2NNTP_MAILER_DELIVERYMODE', `post') -_DEFIFNOT(`LMTP2NNTP_MAILER_GROUPMODE', `envelope') -_DEFIFNOT(`LMTP2NNTP_MAILER_MAILFROM', `.+@(?:[^.]+\.)+\.[^.]+') -_DEFIFNOT(`LMTP2NNTP_MAILER_NODENAME', `confDOMAIN_NAME') -_DEFIFNOT(`LMTP2NNTP_MAILER_SIZE', `800000') -_DEFIFNOT(`LMTP2NNTP_MAILER_LOGLEVEL', `notice:/var/log/lmtp2nntp') -_DEFIFNOT(`LMTP2NNTP_MAILER_WAITTIME', `60') -_DEFIFNOT(`LMTP2NNTP_MAILER_NEWSGROUP', `\*') -POPDIVERT - -######################################### -### LMTP2NNTP Mailer specification ### -######################################### - -Mlmtp2nntp, P=LMTP2NNTP_MAILER_PATH, F=LMTP2NNTP_MAILER_FLAGS, - S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, - L=990, T=DNS/RFC822/SMTP, M=LMTP2NNTP_MAILER_MAX, - A=lmtp2nntp LMTP2NNTP_MAILER_ARGS dnl - -b LMTP2NNTP_MAILER_BINDADDR dnl - -d LMTP2NNTP_MAILER_DELIVERYMODE dnl - -g LMTP2NNTP_MAILER_GROUPMODE dnl - -h $h dnl - -m LMTP2NNTP_MAILER_MAILFROM dnl - -n LMTP2NNTP_MAILER_NODENAME dnl - -s LMTP2NNTP_MAILER_SIZE dnl - -l LMTP2NNTP_MAILER_LOGLEVEL dnl - -w LMTP2NNTP_MAILER_WAITTIME dnl - LMTP2NNTP_MAILER_NEWSGROUP -______________________________________________________________________ - -Add to your sendmail.m4 (or sendmail.mc) the following entry: - -______________________________________________________________________ - -dnl # Mailer: LMTP2NNTP (mail to news gateway) -dnl define(`LMTP2NNTP_MAILER_PATH', `/path/to/your/lmtp2nntp') -dnl MAILER(lmtp2nntp) -______________________________________________________________________ - - -Add to your virtualusertable: -______________________________________________________________________ - -posting@gateway.example.com posting@lmtp2nntp.invalid -posting+*@gateway.example.com %2@lmtp2nntp.invalid -@news.example.com %1@lmtp2nntp.invalid -______________________________________________________________________ + _ _ ____ _ + | |_ __ ___ | |_ _ __|___ \ _ __ _ __ | |_ _ __ + | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ + | | | | | | | |_| |_) / __/| | | | | | | |_| |_) | + |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ + |_| |_| + + OSSP lmtp2nntp - Mail to News Gateway + + INSTALLATION + + To install OSSP lmtp2nntp into /path/to/lmtp2nntp/{bin,man}/ perform + the following steps in your shell: + + $ ./configure --prefix=/path/to/lmtp2nntp + $ make + $ make check + $ make install + + CONFIGURATION + + In order to use OSSP lmtp2nntp, the program has to be integrated into + a Mail Transfer Agent (MTA) which speaks Local Mail Transfer Protocol + (LMTP). OSSP lmtp2nntp was developed with Sendmail 8.11, but should + also work with other MTAs who provide an LMTP interface. The detailed + integration into Sendmail 8.11 is shown below. + + Sendmail Integration + + 1. Create a "cf/mailer/lmtp2nntp.m4" macro file with the following contents: + + | PUSHDIVERT(-1) + | _DEFIFNOT(`LMTP2NNTP_MAILER_PATH', `/usr/local/bin/lmtp2nntp') + | _DEFIFNOT(`LMTP2NNTP_MAILER_FLAGS', `mDFMuXz') + | _DEFIFNOT(`LMTP2NNTP_MAILER_ARGS', `') + | _DEFIFNOT(`LMTP2NNTP_MAILER_BINDADDR', '0.0.0.0') + | _DEFIFNOT(`LMTP2NNTP_MAILER_DELIVERYMODE', `post') + | _DEFIFNOT(`LMTP2NNTP_MAILER_GROUPMODE', `envelope') + | _DEFIFNOT(`LMTP2NNTP_MAILER_MAILFROM', `.+@(?:[^.]+\.)+\.[^.]+') + | _DEFIFNOT(`LMTP2NNTP_MAILER_NODENAME', `confDOMAIN_NAME') + | _DEFIFNOT(`LMTP2NNTP_MAILER_SIZE', `800000') + | _DEFIFNOT(`LMTP2NNTP_MAILER_LOGLEVEL', `notice:/var/log/lmtp2nntp') + | _DEFIFNOT(`LMTP2NNTP_MAILER_WAITTIME', `60') + | _DEFIFNOT(`LMTP2NNTP_MAILER_NEWSGROUP', `\*') + | POPDIVERT + | + | ######################################### + | ### LMTP2NNTP Mailer specification ### + | ######################################### + | + | Mlmtp2nntp, P=LMTP2NNTP_MAILER_PATH, F=LMTP2NNTP_MAILER_FLAGS, + | S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, + | L=990, T=DNS/RFC822/SMTP, M=LMTP2NNTP_MAILER_MAX, + | A=lmtp2nntp LMTP2NNTP_MAILER_ARGS dnl + | -b LMTP2NNTP_MAILER_BINDADDR dnl + | -d LMTP2NNTP_MAILER_DELIVERYMODE dnl + | -g LMTP2NNTP_MAILER_GROUPMODE dnl + | -h $h dnl + | -m LMTP2NNTP_MAILER_MAILFROM dnl + | -n LMTP2NNTP_MAILER_NODENAME dnl + | -s LMTP2NNTP_MAILER_SIZE dnl + | -l LMTP2NNTP_MAILER_LOGLEVEL dnl + | -w LMTP2NNTP_MAILER_WAITTIME dnl + | LMTP2NNTP_MAILER_NEWSGROUP + + This changes nothing in your Sendmail configuration, but just adds + a new mailer named "lmtp2nntp" to Sendmail. + + 2. Add to your Sendmail M4 configuration (file "sendmail.m4" or + "sendmail.mc" according to your installation) the following entry: + + | dnl # Mailer: LMTP2NNTP (mail to news gateway) + | define(`LMTP2NNTP_MAILER_PATH', `/path/to/lmtp2nntp/bin/lmtp2nntp') + | MAILER(lmtp2nntp) + + This defines the new "lmtp2nntp" mailer in your Sendmail + configuration, but still does not activate it. Additionally feel + free to overwrite more LMTP2NNTP_MAILER_XXXX variables in order + to adjust the run-time behaviour of OSSP lmtp2nntp. See the + lmtp2nntp(1) manual page for more details about the commmand line + parameters. + + 3. Add the following entries to both your virtual user table (file + "virtusertable") and your mailer table (file "mailertable") in order + to finally activate the mail to news gateway: + + virtusertable: + + | posting+*@gateway.example.com %2@lmtp2nntp.invalid + + mailertable: + + | lmtp2nntp.invalid lmtp2nntp:news.example.com + + Notice that we use the RFC2606 top-level domain name ".invalid" + for the internal mapping between virtual user table and the + mailer table. This is neccessary because Sendmail cannot directly + map individual recipient mailbox addresses to outgoing mailers. + + In this example configrution we assumed that the machine + "gateway.example.com" is the FQDN of machine running Sendmail + and OSSP lmtp2nntp and "news.example.com" is the remote Usenet + News server speaking NNTP. This means that mails addressed to + "posting+foo.bar@gateway.example.com" are posted via NNTP as news + articles into the newsgroup foo.bar on "news.example.com". + + Additionally, if just the MX DNS record for "news.example.com" + points to the address of "gateway.example.com" you can add the + following additional entry to your virtual user table in order + to let "news.example.com" virtually provide mail to news gateway + functionality: -Add to your mailertable: -______________________________________________________________________ + virtusertable: -lmtp2nntp.invalid lmtp2nntp:news.example.com -______________________________________________________________________ + | @news.example.com %1@lmtp2nntp.invalid + + Notice that there are more delivery modes supported by OSSP + lmtp2nntp. Refer to the lmtp2nntp(1) manual page for more details. Index: ossp-pkg/lmtp2nntp/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Makefile.in,v rcsdiff -q -kk '-r1.22' '-r1.23' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Makefile.in,v' 2>/dev/null --- Makefile.in 2001/09/13 12:21:34 1.22 +++ Makefile.in 2001/09/13 13:45:12 1.23 @@ -116,7 +116,7 @@ @$(SHTOOL) fixperm -v .; \ V=`$(SHTOOL) version -lc -dshort version.c`; \ $(SHTOOL) tarball -o lmtp2nntp-$${V}.tar.gz -d lmtp2nntp-$${V} -u ossp -g ossp \ - -e 'CVS,\.cvsignore,\.[ao],^\.,/\.,autogen.sh,*.tar.gz,*.bak' -c 'gzip --best' . + -e 'CVS,\.cvsignore,\.[ao],^\.,/\.,autogen.sh,*.tar.gz,*.bak,TODO' -c 'gzip --best' . check: lmtp2nntp @./test.sh Index: ossp-pkg/lmtp2nntp/NEWS RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/NEWS,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/NEWS,v' 2>/dev/null --- NEWS 2001/09/11 06:43:13 1.1 +++ NEWS 2001/09/13 13:45:12 1.2 @@ -1,8 +1,14 @@ - NEWS - ==== + _ _ ____ _ + | |_ __ ___ | |_ _ __|___ \ _ __ _ __ | |_ _ __ + | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ + | | | | | | | |_| |_) / __/| | | | | | | |_| |_) | + |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ + |_| |_| + + OSSP lmtp2nntp - Mail to News Gateway - OSSP lmtp2nntp - mail to news gateway + NEWS This is the initial public release. Thanks to Cable & Wireless Deutschland GmbH for supporting open source software. Those folks who tested and Index: ossp-pkg/lmtp2nntp/README RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/README,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/README,v' 2>/dev/null --- README 2001/09/11 06:43:13 1.5 +++ README 2001/09/13 13:45:12 1.6 @@ -1,15 +1,55 @@ - README - ====== + _ _ ____ _ + | |_ __ ___ | |_ _ __|___ \ _ __ _ __ | |_ _ __ + | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ + | | | | | | | |_| |_) / __/| | | | | | | |_| |_) | + |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ + |_| |_| - OSSP lmtp2nntp - mail to news gateway + OSSP lmtp2nntp - Mail to News Gateway + Version 0.1.0 (08-Sep-2001) - The lmtp2nntp 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. + ABSTRACT + + 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. + + COPYRIGHT AND LICENSE + + 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 . + + HOME AND DOCUMENTATION + + The documentation and latest release can be found on + + o http://www.ossp.org/pkg/lmtp2nntp/ [STILL NOT AVAILABLE] + o ftp://ftp.ossp.org/pkg/lmtp2nntp/ Index: ossp-pkg/lmtp2nntp/THANKS RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/THANKS,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/THANKS,v' 2>/dev/null --- THANKS 2001/09/11 06:43:13 1.1 +++ THANKS 2001/09/13 13:45:12 1.2 @@ -1,10 +1,17 @@ + _ _ ____ _ + | |_ __ ___ | |_ _ __|___ \ _ __ _ __ | |_ _ __ + | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ + | | | | | | | |_| |_) / __/| | | | | | | |_| |_) | + |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ + |_| |_| + + OSSP lmtp2nntp - Mail to News Gateway + THANKS - ====== This is a list of contributors who have written or edited parts of the OSSP lmtp2nntp sources or inspired the AUTHORS. - Christoph Schug - - LMTP idea as an alternative to piping into a script + Christoph Schug Index: ossp-pkg/lmtp2nntp/argz.html RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/argz.html,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/argz.html,v' | diff -u - /dev/null -L'ossp-pkg/lmtp2nntp/argz.html' 2>/dev/null --- ossp-pkg/lmtp2nntp/argz.html +++ /dev/null 2024-04-24 12:30:39.000000000 +0200 @@ -1,238 +0,0 @@ - - - - -Untitled Document - - -

Untitled Document

-

-


- - - -

Argz Vectors

- -

- - - -argz vectors are vectors of strings in a contiguous block of -memory, each element separated from its neighbors by null-characters -('\0'). - - - - -

Argz Functions

- -

-Each argz vector is represented by a pointer to the first element, of -type char *, and a size, of type size_t, both of which can -be initialized to 0 to represent an empty argz vector. All argz -functions accept either a pointer and a size argument, or pointers to -them, if they will be modified. - - -

-The argz functions use malloc/realloc to allocate/grow -argz vectors, and so any argz vector creating using these functions may -be freed by using free; conversely, any argz function that may -grow a string expects that string to have been allocated using -malloc (those argz functions that only examine their arguments or -modify them in place will work on any sort of memory). - - -

-All argz functions that do memory allocation have a return type of -int, and return 0 for success, and ENOMEM if an -allocation error occurs. - - -

- -These functions are declared in the standard include file `argz.h'. - - -

-

-
Function: int argz_create (char *const argv[], char **argz, size_t *argz_len) -
-The argz_create function converts the Unix-style argument vector -argv (a vector of pointers to normal C strings, terminated by -(char *)0;) into an argz vector with -the same elements, which is returned in argz and argz_len. -
- - -

-

-
Function: int argz_create_sep (const char *string, int sep, char **argz, size_t *argz_len) -
-The argz_create_sep function converts the null-terminated string -string into an argz vector (returned in argz and -argz_len) by splitting it into elements at every occurrence of the -character sep. -
- - -

-

-
Function: size_t argz_count (const char *argz, size_t arg_len) -
-Returns the number of elements in the argz vector argz and -argz_len. -
- - -

-

-
Function: void argz_extract (char *argz, size_t argz_len, char **argv) -
-The argz_extract function converts the argz vector argz and -argz_len into a Unix-style argument vector stored in argv, -by putting pointers to every element in argz into successive -positions in argv, followed by a terminator of 0. -Argv must be pre-allocated with enough space to hold all the -elements in argz plus the terminating (char *)0 -((argz_count (argz, argz_len) + 1) * sizeof (char *) -bytes should be enough). Note that the string pointers stored into -argv point into argz---they are not copies--and so -argz must be copied if it will be changed while argv is -still active. This function is useful for passing the elements in -argz to an exec function. -
- - -

-

-
Function: void argz_stringify (char *argz, size_t len, int sep) -
-The argz_stringify converts argz into a normal string with -the elements separated by the character sep, by replacing each -'\0' inside argz (except the last one, which terminates the -string) with sep. This is handy for printing argz in a -readable manner. -
- - -

-

-
Function: int argz_add (char **argz, size_t *argz_len, const char *str) -
-The argz_add function adds the string str to the end of the -argz vector *argz, and updates *argz and -*argz_len accordingly. -
- - -

-

-
Function: int argz_add_sep (char **argz, size_t *argz_len, const char *str, int delim) -
-The argz_add_sep function is similar to argz_add, but -str is split into separate elements in the result at occurrences of -the character delim. This is useful, for instance, for -adding the components of a Unix search path to an argz vector, by using -a value of ':' for delim. -
- - -

-

-
Function: int argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len) -
-The argz_append function appends buf_len bytes starting at -buf to the argz vector *argz, reallocating -*argz to accommodate it, and adding buf_len to -*argz_len. -
- - -

-

-
Function: int argz_delete (char **argz, size_t *argz_len, char *entry) -
-If entry points to the beginning of one of the elements in the -argz vector *argz, the argz_delete function will -remove this entry and reallocate *argz, modifying -*argz and *argz_len accordingly. Note that as -destructive argz functions usually reallocate their argz argument, -pointers into argz vectors such as entry will then become invalid. -
- - -

-

-
Function: int argz_insert (char **argz, size_t *argz_len, char *before, const char *entry) -
-The argz_insert function inserts the string entry into the -argz vector *argz at a point just before the existing -element pointed to by before, reallocating *argz and -updating *argz and *argz_len. If before -is 0, entry is added to the end instead (as if by -argz_add). Since the first element is in fact the same as -*argz, passing in *argz as the value of -before will result in entry being inserted at the beginning. -
- - -

-

-
Function: char * argz_next (char *argz, size_t argz_len, const char *entry) -
-The argz_next function provides a convenient way of iterating -over the elements in the argz vector argz. It returns a pointer -to the next element in argz after the element entry, or -0 if there are no elements following entry. If entry -is 0, the first element of argz is returned. - - -

-This behavior suggests two styles of iteration: - - - -

-    char *entry = 0;
-    while ((entry = argz_next (argz, argz_len, entry)))
-      action;
-
- -

-(the double parentheses are necessary to make some C compilers shut up -about what they consider a questionable while-test) and: - - - -

-    char *entry;
-    for (entry = argz;
-         entry;
-         entry = argz_next (argz, argz_len, entry))
-      action;
-
- -

-Note that the latter depends on argz having a value of 0 if -it is empty (rather than a pointer to an empty block of memory); this -invariant is maintained for argz vectors created by the functions here. -

- - -

-

-
Function: int argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, unsigned *replace_count) -
-Replace any occurrences of the string str in argz with -with, reallocating argz as necessary. If -replace_count is non-zero, *replace_count will be -incremented by number of replacements performed. -
- - -


-This document was generated on 25 July 2001 using -texi2html 1.56k. - - Index: ossp-pkg/lmtp2nntp/lmtp.pod RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp.pod,v co -q -kk -p'1.2' '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp.pod,v' | diff -u - /dev/null -L'ossp-pkg/lmtp2nntp/lmtp.pod' 2>/dev/null --- ossp-pkg/lmtp2nntp/lmtp.pod +++ /dev/null 2024-04-24 12:30:39.000000000 +0200 @@ -1,200 +0,0 @@ -## -## 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 . -## -## lmtp.pod: Local Mail Transfer Protocol (LMTP) server library (manual page) -## - -=pod - -=head1 NAME - -B - Local Mail Transfer Protocol (LMTP) Server Library - -=head1 SYNOPSIS - -=over 4 - -=item Headers: - -B. - -=item Types: - -B, -B, -B, -B, -B, -B. - -=item Functions: - -B, -B, -B, -B, -B, -B, -B, -B, -B. - -=item Return Codes: - -B, -B, -B, -B, -B, -B, -B. - -=back - -=head1 DESCRIPTION - -This library provides a generic framework for implementing the Local Mail -Transport Protocol (LMTP) in a server application. - -The following data types are declared: - -=over 4 - -=item B - -This is the opaque data type which forms the LMTP session handle. -It is passed through every API function as its context. - -=item B - -This is a simple I/O structure which can be passed to ltmp_create(3) in -order override the underlying I/O routines used by the LMTP library. -It contains the following two attributes which match the prototype of -read(2) and write(2). - - ssize_t (*read)(int, void *, size_t); - ssize_t (*write)(int, const void *, size_t); - -=item B - -This is a simple Request structure. -It contains the following two attributes: - - char *verb; /* LMTP request verb */ - char *msg; /* LMTP request message (whole line) */ - -=item B - -... - - char *statuscode; /* digit digit digit NUL */ - char *dsncode; /* digit dot digit dot digit NUL */ - char *statusmsg; /* message with >=0*NLs, not terminating with NL. NUL */ - -=item B - -... - - LMTP_OK - LMTP_EOF /* eof */ - LMTP_ERR_SYSTEM /* see errno */ - LMTP_ERR_MEM /* dynamic memory allocation failed */ - LMTP_ERR_OVERFLOW /* static allocated memory exhausted */ - LMTP_ERR_ARG /* invalid arg was passed to function */ - LMTP_ERR_UNKNOWN /* guru meditation */ - -=item B - -... - -lmtp_rc_t (*B)(lmtp_t *I, lmtp_io_t *I, lmtp_req_t -*I, void *I); - -=back - -The following API functions are provided: - -=item lmtp_t *B(int I, int I, lmtp_io_t *I); - -... - -=item void B(lmtp_t *I); - -... - -=item lmtp_rc_t B(lmtp_t *I, char *I, size_t I); - -... - -=item lmtp_rc_t B(lmtp_t *I, char **I, size_t I); - -... - -=item lmtp_rc_t B(lmtp_t *I, lmtp_req_t *I); - -... - -=item lmtp_rc_t B(lmtp_t *I, lmtp_res_t *I); - -... - -=item char *B(lmtp_t *I, lmtp_rc_t I); - -... - -=item lmtp_rc_t B(lmtp_t *I, char *I, lmtp_cb_t I, void *I, lmtp_cb_t *I, void **I); - -... - -=item lmtp_rc_t B(lmtp_t *I); - -... - -=back - -=head1 EXAMPLE - -... - -=head1 STANDARDS - -RFC 2033: Local Mail Transfer Protocol (SMTP) - -RFC 821, STD 90: Simple Mail Transfer Protocol (SMTP) - -RFC 1891: Delivery Status Notification (DSN) - -RFC 2920: SMTP Service Extension for Command Pipelining - -=head1 AUTHORS - - Thomas Lotterer - thomas.lotterer@cw.com - Cable & Wireless Deutschland GmbH - - Ralf S. Engelschall - ralf.engelschall@cw.com - Cable & Wireless Deutschland GmbH - -=cut - Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.60' '-r1.61' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/09/13 12:20:35 1.60 +++ lmtp2nntp.c 2001/09/13 13:45:12 1.61 @@ -83,7 +83,7 @@ #define NUL '\0' #endif -#define ERR_EXECUTION -1 +#define ERR_EXECUTION 1 #define ERR_DELIVERY -2 #define STDSTRLEN 128 Index: ossp-pkg/lmtp2nntp/lmtp2nntp.pod RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v rcsdiff -q -kk '-r1.20' '-r1.21' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v' 2>/dev/null --- lmtp2nntp.pod 2001/09/12 07:29:23 1.20 +++ lmtp2nntp.pod 2001/09/13 13:45:12 1.21 @@ -28,7 +28,7 @@ =head1 NAME -B - mail to news gateway +B - mail to news gateway =head1 SYNOPSIS @@ -47,15 +47,18 @@ =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 B 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. B 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 options are available: +The following command line options and arguments are available: =over 4 @@ -157,37 +160,11 @@ =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. +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. =head1 STANDARDS @@ -264,13 +241,5 @@ =back -=head1 AUTHOR - - The OSSP Project - Cable & Wireless Deutschland GmbH - Thomas Lotterer - - =cut - Index: ossp-pkg/lmtp2nntp/shpat_match.3 RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/shpat_match.3,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/shpat_match.3,v' | diff -u - /dev/null -L'ossp-pkg/lmtp2nntp/shpat_match.3' 2>/dev/null --- ossp-pkg/lmtp2nntp/shpat_match.3 +++ /dev/null 2024-04-24 12:30:39.000000000 +0200 @@ -1,296 +0,0 @@ -.rn '' }` -''' $RCSfile$$Revision$$Date$ -''' -''' $Log$ -''' Revision 1.1 2001/08/06 10:51:11 thl -''' add shpat_match from OSSP shpat library -''' -''' -.de Sh -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp -.if t .sp .5v -.if n .sp -.. -.de Ip -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.de Vb -.ft CW -.nf -.ne \\$1 -.. -.de Ve -.ft R - -.fi -.. -''' -''' -''' Set up \*(-- to give an unbreakable dash; -''' string Tr holds user defined translation string. -''' Bell System Logo is used as a dummy character. -''' -.tr \(*W-|\(bv\*(Tr -.ie n \{\ -.ds -- \(*W- -.ds PI pi -.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -.ds L" "" -.ds R" "" -''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of -''' \*(L" and \*(R", except that they are used on ".xx" lines, -''' such as .IP and .SH, which do another additional levels of -''' double-quote interpretation -.ds M" """ -.ds S" """ -.ds N" """"" -.ds T" """"" -.ds L' ' -.ds R' ' -.ds M' ' -.ds S' ' -.ds N' ' -.ds T' ' -'br\} -.el\{\ -.ds -- \(em\| -.tr \*(Tr -.ds L" `` -.ds R" '' -.ds M" `` -.ds S" '' -.ds N" `` -.ds T" '' -.ds L' ` -.ds R' ' -.ds M' ` -.ds S' ' -.ds N' ` -.ds T' ' -.ds PI \(*p -'br\} -.\" If the F register is turned on, we'll generate -.\" index entries out stderr for the following things: -.\" TH Title -.\" SH Header -.\" Sh Subsection -.\" Ip Item -.\" X<> Xref (embedded -.\" Of course, you have to process the output yourself -.\" in some meaninful fashion. -.if \nF \{ -.de IX -.tm Index:\\$1\t\\n%\t"\\$2" -.. -.nr % 0 -.rr F -.\} -.TH shpat_match 3 "19-Aug-1999" "Shpat 1.0.0" "MAX File Name Library" -.UC -.if n .hy 0 -.if n .na -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.de CQ \" put $1 in typewriter font -.ft CW -'if n "\c -'if t \\&\\$1\c -'if n \\&\\$1\c -'if n \&" -\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 -'.ft R -.. -.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 -. \" AM - accent mark definitions -.bd B 3 -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds ? ? -. ds ! ! -. ds / -. ds q -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' -. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] -.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' -.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' -.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -.ds oe o\h'-(\w'o'u*4/10)'e -.ds Oe O\h'-(\w'O'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds v \h'-1'\o'\(aa\(ga' -. ds _ \h'-1'^ -. ds . \h'-1'. -. ds 3 3 -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -. ds oe oe -. ds Oe OE -.\} -.rm #[ #] #H #V #F C -.SH "NAME" -\fBshpat_match\fR \- match filename or pathname -.SH "SYNOPSIS" -#include <\fBshpat_match.h\fR> -.PP -int \fBshpat_match\fR(const char *\fIpattern\fR, const char *\fIstring\fR, int \fIflags\fR); -.PP -int \fBshpat_match_hasglobchar\fR(const char *\fIpattern\fR); -.SH "DESCRIPTION" -The \fIshpat_match\fR\|(3) function matches patterns according to the rules used by the -shell. It checks the string specified by the \fIstring\fR argument to see if it -matches the pattern specified by the \fIpattern\fR argument. -.Sh "Shell Patterns" -A \fIpattern\fR consists of normal characters, which match themselves, and -meta-characters (aka \fIglob chars\fR). The meta-characters are ``\f(CW!\fR'\*(R', -``\f(CW*\fR'\*(R', ``\f(CW?\fR'\*(R', and ``\f(CW[\fR'\*(R'. These characters lose their special -meanings if they are quoted with a backslash (``\f(CW\e\fR''). -.PP -An asterisk (``\f(CW*\fR'') matches any string of characters. A question mark -(``\f(CW?\fR'') matches any single character. A left bracket (``\f(CW[\fR'') introduces -a character class. The end of the character class is indicated by a ``\f(CW]\fR'\*(R'; -if the ``\f(CW]\fR'\*(R' is missing then the ``\f(CW[\fR'\*(R' matches a ``\f(CW[\fR'\*(R' rather than -introducing a character class. A character class matches any of the -characters between the square brackets. A range of characters may be -specified using a minus sign (``\f(CW-\fR''). The character class may be -complemented/negated by making an exclamation point (``\f(CW!\fR'') the first -character of the character class. -.PP -To include a ``\f(CW]\fR'\*(R' in a character class, make it the first character listed -(after the ``\f(CW!\fR'\*(R', if any). To include a minus sign, make it the first or -last character listed. -.Sh "Matching Interpretation" -The \fIflags\fR argument modifies the interpretation of \fIpattern\fR and \fIstring\fR -The value of \fIflags\fR is the bitwise inclusive \fI\s-1OR\s0\fR of any of the following -constants, which are defined in the include file \f(CWshpat_match.h\fR. -.Ip "\f(CWSHPAT_M_NOESCAPE\fR" 4 -Normally, every occurrence of a backslash (``\f(CW\e\fR'') followed by a character -in \fIpattern\fR is replaced by that character. This is done to negate any -special meaning for the character. If the \f(CWFNM_NOESCAPE\fR flag is set, a -backslash character is treated as an ordinary character. -.Ip "\f(CWSHPAT_M_PATHNAME\fR" 4 -Slash characters in \fIstring\fR must be explicitly matched by slashes in -\fIpattern\fR If this flag is not set, then slashes are treated as regular -characters. -.Ip "\f(CWSHPAT_M_PERIOD\fR" 4 -Leading periods in \fIstring\fR must be explicitly matched by periods in -\fIpattern\fR If this flag is not set, then leading periods are treated as -regular characters. The definition of ``leading'\*(R' is related to the -specification of \f(CWFNM_PATHNAME\fR A period is always ``leading'\*(R' if it is the -first character in \fIstring\fR Additionally, if \fI\s-1FNM_PATHNAME\s0\fR is set, a period -is ``leading'\*(R' if it immediately follows a slash. -.Ip "\f(CWSHPAT_M_LEADING_DIR\fR" 4 -Ignore ``\f(CW/*\fR'\*(R' rest after successful \fIpattern\fR matching. -.Ip "\f(CWSHPAT_M_CASEFOLD\fR" 4 -Ignore case distinctions in both the \fIpattern\fR and the \fIstring\fR. -.SH "RETURN VALUES" -The \fIshpat_match\fR\|(3) function returns zero if \fIstring\fR matches the pattern -specified by \fIpattern\fR, otherwise, it returns the value \f(CWFNM_NOMATCH\fR. -.SH "BUGS" -The pattern ``\f(CW*\fR'\*(R' matches the empty string, even if \f(CWFNM_PATHNAME\fR is -specified. -.SH "SEE ALSO" -\fIsh\fR\|(1), \fIshpat_glob\fR\|(3). -.SH "STANDARDS" -The \fIshpat_match\fR\|(3) function conforms to IEEE Std1003.2 (``POSIX.2'') -.SH "HISTORY" -The \fIshpat_match\fR\|(3) function is derived from the \fIfnmatch\fR\|(3) function of FreeBSD -3.1 which itself derived it from 4.4BSD. The \fIshpat_match_hasglobchar\fR\|(3) -function is derived from the \fIap_is_fnmatch\fR\|(3) function of Apache 1.3. - -.rn }` '' -.IX Title "shpat_match 3" -.IX Name "B - match filename or pathname" - -.IX Header "NAME" - -.IX Header "SYNOPSIS" - -.IX Header "DESCRIPTION" - -.IX Subsection "Shell Patterns" - -.IX Subsection "Matching Interpretation" - -.IX Item "\f(CWSHPAT_M_NOESCAPE\fR" - -.IX Item "\f(CWSHPAT_M_PATHNAME\fR" - -.IX Item "\f(CWSHPAT_M_PERIOD\fR" - -.IX Item "\f(CWSHPAT_M_LEADING_DIR\fR" - -.IX Item "\f(CWSHPAT_M_CASEFOLD\fR" - -.IX Header "RETURN VALUES" - -.IX Header "BUGS" - -.IX Header "SEE ALSO" - -.IX Header "STANDARDS" - -.IX Header "HISTORY" -