head	1.18;
access;
symbols
	LMTP2NNTP_1_4_1:1.18
	LMTP2NNTP_1_4_0:1.18
	LMTP2NNTP_1_3_0:1.18
	LMTP2NNTP_1_3b2:1.18
	LMTP2NNTP_1_3b1:1.18
	LMTP2NNTP_1_3a3:1.18
	LMTP2NNTP_1_3a2:1.18
	LMTP2NNTP_1_3a1:1.18
	LMTP2NNTP_1_2_0:1.16
	LMTP2NNTP_1_2b4:1.16
	LMTP2NNTP_1_2b3:1.16
	LMTP2NNTP_1_2b2:1.16
	LMTP2NNTP_1_2b1:1.15
	LMTP2NNTP_1_2a8:1.15
	LMTP2NNTP_1_2a7:1.14
	LMTP2NNTP_1_2a6:1.12
	LMTP2NNTP_1_2a5:1.12
	LMTP2NNTP_1_2a4:1.12
	LMTP2NNTP_1_2a3:1.12
	SOURCE_RESTRUCTURING_AFTER:1.12
	SOURCE_RESTRUCTURING_BEFORE:1.12
	LMTP2NNTP_1_2a1:1.12
	LMTP2NNTP_1_1_1:1.12
	LMTP2NNTP_1_1_0:1.11
	LMTP2NNTP_1_1b4:1.11
	LMTP2NNTP_1_1b3:1.11
	LMTP2NNTP_1_1b2:1.10
	LMTP2NNTP_1_1b1:1.9
	LMTP2NNTP_1_0_0:1.6
	LMTP2NNTP_0_9_7:1.4
	LMTP2NNTP_0_9_6:1.4
	LMTP2NNTP_0_9_5:1.4
	LMTP2NNTP_0_9_4:1.4
	LMTP2NNTP_0_9_3:1.4
	LMTP2NNTP_0_9_2:1.4
	LMTP2NNTP_0_9_1:1.3;
locks; strict;
comment	@# @;


1.18
date	2003.02.17.12.30.56;	author thl;	state Exp;
branches;
next	1.17;

1.17
date	2003.02.17.12.24.44;	author thl;	state Exp;
branches;
next	1.16;

1.16
date	2003.02.06.21.22.34;	author thl;	state Exp;
branches;
next	1.15;

1.15
date	2003.02.05.15.34.19;	author thl;	state Exp;
branches;
next	1.14;

1.14
date	2003.01.30.19.45.19;	author rse;	state Exp;
branches;
next	1.13;

1.13
date	2003.01.30.19.42.12;	author rse;	state Exp;
branches;
next	1.12;

1.12
date	2001.11.14.13.57.14;	author thl;	state Exp;
branches;
next	1.11;

1.11
date	2001.11.07.13.47.06;	author thl;	state Exp;
branches;
next	1.10;

1.10
date	2001.10.13.13.45.11;	author rse;	state Exp;
branches;
next	1.9;

1.9
date	2001.10.11.09.35.39;	author thl;	state Exp;
branches;
next	1.8;

1.8
date	2001.10.09.10.19.12;	author rse;	state Exp;
branches;
next	1.7;

1.7
date	2001.09.13.18.40.19;	author rse;	state Exp;
branches;
next	1.6;

1.6
date	2001.09.13.13.45.12;	author thl;	state Exp;
branches;
next	1.5;

1.5
date	2001.09.13.12.57.49;	author thl;	state Exp;
branches;
next	1.4;

1.4
date	2001.08.20.14.36.29;	author rse;	state Exp;
branches;
next	1.3;

1.3
date	2001.08.20.14.11.30;	author thl;	state Exp;
branches;
next	1.2;

1.2
date	2001.08.20.13.22.33;	author thl;	state Exp;
branches;
next	1.1;

1.1
date	2001.08.20.12.57.38;	author thl;	state Exp;
branches;
next	;


desc
@@


1.18
log
@practice has shown less is more
@
text
@   _       ___  ____ ____  ____   _         _        ___            _
  |_|_ _  / _ \/ ___/ ___||  _ \ | |_ _ __ | |_ _ __|__ \ _ _  _ _ | |_ _ __
  _|_||_|| | | \___ \___ \| |_) || | ' `  \| __| '_ \ _) | ' \| ' \| __| '_ \
 |_||_|_|| |_| |___) |__) |  __/ | | || || | |_| |_) / _/| || | || | |_| |_) |
  |_|_|_| \___/|____/____/|_|    |_|_||_||_|\__| .__/____|_||_|_||_|\__| .__/
                                               |_|                     |_|
  OSSP lmtp2nntp - Mail to News Gateway

  INSTALLATION
  ============

  To install OSSP lmtp2nntp into /path/to/lmtp2nntp/{sbin,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 and tested with Sendmail 8.12 and
  Postfix 2.0, but should also work with other MTAs who provide an LMTP
  interface. The detailed integration into Sendmail and Postfix is shown
  below.

  Sendmail
  --------

  1. Create a new mailer definition macro file

     cf/mailer/lmtp2nntp.m4
     |
     | PUSHDIVERT(-1)
     | 
     | _DEFIFNOT(`LMTP2NNTP_MAILER_PATH',  `/usr/local/sbin/lmtp2nntp')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_FLAGS', `mDFMuXz0')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_MAX',   `8388608')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_ARGS',  `--include /usr/local/etc/lmtp2nntp.conf')
     | 
     | 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_MAILER_ARGS

  2. Use the new mailer definition macro within master control

     Sendmail and lmtp2nntp can talk LMTP to each other through
     stdin/stdout. In this case Sendmail spawns a child whenever it
     wants to talk and no communication channel is already established.
     The new process execs lmtp2nntp and finally the Sendmail parent and
     the lmtp2nntp child are connected through a local pipe.

     sendmail.m4 entry for local pipe
     |
     | dnl #  Mailer: LMTP2NNTP (mail to news gateway using pipe)
     | dnl define(`LMTP2NNTP_MAILER_FLAGS', `mDFMuXz0')
     | dnl define(`LMTP2NNTP_MAILER_PATH',  `/usr/local/sbin/lmtp2nntp')
     | dnl define(`LMTP2NNTP_MAILER_ARGS',  `lmtp2nntp --include /usr/local/etc/lmtp2nntp.conf')

     Alternatively, Sendmail and lmtp2nntp can talk LMTP to each other
     through a socket. Both BSD network and UNIX domain sockets are
     supported.  In this case Sendmail connects to lmtp2nntp through the
     network. It is a requirement to start lmtp2nntp in daemon mode as
     described in the "daemonize" section below.

     sendmail.m4 entry for network socket
     |
     | dnl #  Mailer: LMTP2NNTP (mail to news gateway using socket)
     | define(`LMTP2NNTP_MAILER_FLAGS', `mDFMuXz0')
     | define(`LMTP2NNTP_MAILER_PATH',  `[IPC]')

     sendmail.m4 entry for UNIX domain socket
     |
     | define(`LMTP2NNTP_MAILER_ARGS',  `FILE /usr/local/var/lmtp2nntp/lmtp2nntp.socket')

     sendmail.m4 entry for BSD network socket
     |
     | define(`LMTP2NNTP_MAILER_ARGS',  `TCP 127.0.0.1 24')

     In all cases, tell M4 to divert configuration information based
     your preferences into sendmail.cf.  This defines the new
     "lmtp2nntp" mailer in your Sendmail configuration. Additional steps
     are required to activate the configuration.

     sendmail.m4
     |
     | MAILER(lmtp2nntp)


  3. Activate the virtual user table and mailer table in your Sendmail
     M4 configuration 

     sendmail.m4
     |
     | FEATURE(mailertable,   `hash -o /path/to/mailertable')
     | FEATURE(virtusertable, `hash -o /path/to/virtusertable')

  4. Add the following entries to your virtual user table 
     and your mailer table

     virtusertable
     |
     | posting+*@@gateway.example.com %2@@lmtp2nntp.invalid

     mailertable
     |
     | lmtp2nntp.invalid lmtp2nntp:news

     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.

     The token following the colon (news.example.com) in mailertable is
     passed to mailer as $h. The instructions regarding sendmail.m4
     above ignore that fact and assume the address of the NNTP server is
     configured in lmtp2nntp.conf. However, only the "pipe" mode
     discussed above is able to catch that information from Sendmail.
     Simply add '--destination $h' to LMTP2NNTP_MAILER_ARGS and omit
     'destination' from the config file. 

     In this example configuration we assume that the machine
     "gateway.example.com" is the FQDN of machine running Sendmail and
     OSSP lmtp2nntp and "news" 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 server "news".

     Additionally, if the MX RR 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:

     virtusertable
     |
     | @@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.

  Postfix
  -------

  1. Make sure that Postfix was built with PCRE map support
     (see README.PCRE in the original Postfix source distribution).
     It basically means building and installing PCRE from
     ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ and
     configuring Postfix with at least:

     | make makefiles \
     |     CCARGS="-I/path/to/pcre/include -DHAS_PCRE"
     |     AUXLIBS="-L/path/to/pcre/lib -lpcre"

  2. In the Postfix main configuration file (main.cf) you have
     to enable the virtual user and transport mapping tables:

     main.cf
     |
     | virtual_maps   = pcre:/usr/local/etc/virtual
     | transport_maps = hash:/usr/local/etc/transport

  3. Add the following entry to the Postfix virtual user mapping table

     /usr/local/etc/virtual
     |
     | /^posting\+(.*)@@gateway\.example\.com$/ $1@@lmtp2nntp.invalid

  4. Add the following entry to the Postfix transport mapping table

     /usr/local/etc/transport
     |
     | lmtp2nntp.invalid  lmtp:unix:/path/to/lmtp2nntp.news.example.com

     Additionally convert the transport mapping table into the hash
     table format Postfix reads (not required for the virtual user
     mapping table above, because it is PCRE based).

     $ postmap /usr/local/etc/transport

  5. Assuming you use the "lmtp2nntpd" run command script as described
     in the next section "Daemonize", start lmtp2nntp daemon and reload
     Postfix to activate the new setup Note that Postfix does not
     support LMTP across local pipes as Sendmail does so running a
     daemon is mandatory.

     $ lmtp2nntpd start
     $ postfix reload

  Daemonize
  ---------

  1. Start lmtp2nntp as a daemon for delivering and listen for incoming
     connections.

     lmtp2nntpd
     |
     | #!/bin/sh
     | LMTP2NNTP_PATH='/usr/local/sbin/lmtp2nntp'
     | LMTP2NNTP_CONF='/usr/local/etc/lmtp2nntp.conf'
     | case $1 in
     |     start )
     |         $LMTP2NNTP_PATH --daemonize --include $LMTP2NNTP_CONF
     |         ;;
     |     stop )
     |         $LMTP2NNTP_PATH --kill      --include $LMTP2NNTP_CONF
     |         ;;
     | esac

  Configuration
  -------------

     lmtp2nntp.conf
     |
     | ##
     | ##  lmtp2nntp.conf -- Mail to News Gateway Configuration
     | ##
     | 
     | #   --- DAEMON ---
     | user               @@l_musr@@
     | childsmax          3
     | pidfile            "@@l_prefix@@/var/lmtp2nntp/lmtp2nntp.pid"
     | 
     | #   --- LMTP SERVER ---
     | 
     | #   server communication on TCP socket (address:port)
     | #acl               127.0.0.1/32
     | #bind              127.0.0.1:24
     | 
     | #   server communication on Unix domain socket (path:permissions)
     | bind               "@@l_prefix@@/var/lmtp2nntp/lmtp2nntp.socket:660"
     | 
     | #   server communication on stdin/stdout (remove DAEMON section above)
     | #bind              -
     | 
     | #   server communication limits
     | timeoutlmtp        0
     | timeoutlmtpaccept  0
     | timeoutlmtpread    10
     | timeoutlmtpwrite   10
     | size               8388608
     | 
     | #   ---- NNTP CLIENT ----
     | 
     | #   client communication via TCP socket
     | #client            127.0.0.1
     | destination        127.0.0.1:nntp
     | 
     | #   client communication limits
     | timeoutnntp        30
     | timeoutnntpconnect 60
     | timeoutnntpread    60
     | timeoutnntpwrite   60
     | operationmode      post
     | 
     | #   ---- GATEWAY OPERATION ----
     | 
     | #   processing mode
     | groupmode          envelope
     | mailfrom           ".*"
     | nodename           "gateway"
     | restrictheader     "X-Gateway:.*lmtp2nntp"
     | newsgroup          "local.test"
     | 
     | #   remove headers (using empty value)
     | headerrule         '500:^(-EF|Path|Received|To|Cc|Bcc|):$1:'
     | 
     | #   merge values from duplicate headers and separte them with "comma space"
     | headerrule         '510:^(Reply-To):$1:[${msg.header.${1}[#]}${msg.header.${1}[#+1]:+, }]'
     | 
     | #   replace empty Subject with text "None"
     | headerrule         '520::Subject:${msg.header.Subject:-None}'
     | 
     | #   create Message-ID if omitted or illegal (no or more than one '@@')
     | headerrule         '530::Message-ID:${msg.header.Message-ID:-@@@@:s/^.*@@.*@@.*$//:%createmessageid}'
     | 
     | #   append a header to inhibit bang path addressing for mail replies
     | headerrule         '540::Path:lmtp2nntp!not-for-mail'
     | 
     | #   append a header to avoid message loops with news2mail gateways - see restrictheader
     | headerrule         '610::X-Gateway:lmtp2nntp'
     | 
     | #   append a header to approve posting to a moderated newsgroup
     | headerrule         '620::Approved:gateway@@example.com'
     | 
     | #   ---- LOGGING ----
     | 
     | #   normal operation
     | l2spec             'info:  prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
     |                         -> buffer(size=65536) \
     |                         -> file(path="@@l_prefix@@/var/lmtp2nntp/lmtp2nntp.log", append=1, perm=0640)'
     | 
     | #   normal and debug operation
     | #l2spec            'noop -> { \
     |                     info:  prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
     |                         -> buffer(size=65536) \
     |                         -> file(path="@@l_prefix@@/var/lmtp2nntp/lmtp2nntp.log", append=1, perm=0640); \
     |                     debug: prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
     |                         -> file(path="@@l_prefix@@/var/lmtp2nntp/lmtp2nntp.debug", append=0, perm=0640) }'
     | 
     | #   raw debug operation only
     | #l2spec            'debug: fd(fd=2)'
@


1.17
log
@improve example, especially the message loop part
@
text
@d231 1
a231 1
     | childsmax          10
@


1.16
log
@consistently omit colon after file names
@
text
@d272 1
a272 1
     | restrictheader     "Cc: j\.doe@@example\.org"
d287 1
a287 1
     | #   append a header
d290 1
a290 1
     | #   append a header
d292 2
@


1.15
log
@update documentation
@
text
@d111 1
a111 1
     virtusertable:
d115 1
a115 1
     mailertable:
d145 1
a145 1
     virtusertable:
@


1.14
log
@remove trailing whitespaces from source tree
@
text
@d12 1
a12 1
  To install OSSP lmtp2nntp into /path/to/lmtp2nntp/{bin,man}/ perform
d25 4
a28 4
  (LMTP). OSSP lmtp2nntp was developed with Sendmail 8.11 and tested
  with Sendmail 8.11 and Postfix 20010228, but should also work with
  other MTAs who provide an LMTP interface. The detailed integration
  into Sendmail 8.11 and Postfix 20010228 is shown below.
d30 2
a31 2
  Sendmail Integration
  --------------------
d33 1
a33 1
  1. Create a "cf/mailer/lmtp2nntp.m4" macro file with the following contents:
d35 2
d38 6
a43 12
     | _DEFIFNOT(`LMTP2NNTP_MAILER_PATH',          `/usr/local/bin/lmtp2nntp')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_FLAGS',         `mDFMuXz')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_ARGS',          `')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_CLIENTBIND',    `0.0.0.0')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_GROUPMODE',     `envelope')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_LOGLEVEL',      `notice:/var/log/lmtp2nntp')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_MAILFROM',      `^.+@@(?:[^.]+\.)+[^.]+\.?$')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_NODENAME',      `confDOMAIN_NAME')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_OPERATIONMODE', `post')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_SIZE',          `800000')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_TIMEOUT',       `nntp:connect=60')
     | _DEFIFNOT(`LMTP2NNTP_MAILER_NEWSGROUP',     `\*')
d45 1
a45 1
     |
d49 1
a49 1
     |
d52 29
a80 15
     |             L=990, T=DNS/RFC822/SMTP, M=LMTP2NNTP_MAILER_SIZE,
     |             A=lmtp2nntp LMTP2NNTP_MAILER_ARGS dnl
     |                         -c LMTP2NNTP_MAILER_CLIENTBIND dnl
     |                         -d $h dnl
     |                         -g LMTP2NNTP_MAILER_GROUPMODE dnl
     |                         -l LMTP2NNTP_MAILER_LOGLEVEL dnl
     |                         -m LMTP2NNTP_MAILER_MAILFROM dnl
     |                         -n LMTP2NNTP_MAILER_NODENAME dnl
     |                         -o LMTP2NNTP_MAILER_OPERATIONMODE dnl
     |                         -s LMTP2NNTP_MAILER_SIZE dnl
     |                         -t LMTP2NNTP_MAILER_TIMEOUT dnl
     |                         LMTP2NNTP_MAILER_NEWSGROUP

     This changes nothing in your Sendmail configuration, but just adds
     a new mailer named "lmtp2nntp" to Sendmail.
d82 7
a88 2
  2. Add to your Sendmail M4 configuration (file "sendmail.m4" or
     "sendmail.mc" according to your installation) the following entry:
d90 4
a93 1
     sendmail.m4:
d95 2
a96 2
     | dnl #  Mailer: LMTP2NNTP (mail to news gateway)
     | define(`LMTP2NNTP_MAILER_PATH', `/path/to/lmtp2nntp/bin/lmtp2nntp')
a98 10
     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. Activate in your Sendmail M4 configuration (file "sendmail.m4" or
     "sendmail.mc" according to your installation) the virtual user
     and mailer table:
d100 2
a101 1
     sendmail.m4:
d103 2
d108 2
a109 3
  4. 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:
d112 2
a113 2

     | posting+*@@gateway.example.com  %2@@lmtp2nntp.invalid
d116 2
a117 2

     | lmtp2nntp.invalid              lmtp2nntp:news.example.com
d124 12
a135 4
     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
d137 1
a137 1
     articles into the newsgroup foo.bar on "news.example.com".
d139 4
a142 4
     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
d146 2
a147 2

     | @@news.example.com              %1@@lmtp2nntp.invalid
d152 2
a153 2
  Postfix Integration
  -------------------
d166 1
a166 1
     enable the virtual user and transport mapping tables:
d168 4
a171 1
     main.cf:
d173 1
a173 6
     | virtual_maps   = pcre:/path/to/virtual
     | transport_maps = hash:/path/to/transport

  3. Add the following entry to the Postfix virtual user mapping table:

     /path/to/virtual:
d175 2
d179 1
a179 3
  4. Add the following entry to the Postfix transport mapping table:

     /path/to/transport:
d181 2
d189 1
a189 1
     $ postmap /path/to/transport
d191 5
a195 4
  5. Start lmtp2nntp as a stand-alone daemon for delivering to
     news.example.com. This is required because in contrast to Sendmail,
     Postfix can speak LMTP only via Unix Domain and Internet Domain
     sockets (but not via a Unix pipe). Use the following script:
d197 5
a201 1
     lmtp2nntpd:
d203 5
d209 2
a210 11
     | LMTP2NNTP_PATH='/usr/local/bin/lmtp2nntp'
     | LMTP2NNTP_ARGS=''
     | LMTP2NNTP_CLIENTBIND='/path/to/lmtp2nntp.news.example.com'
     | LMTP2NNTP_GROUPMODE='envelope'
     | LMTP2NNTP_LOGLEVEL='notice:/var/log/lmtp2nntp'
     | LMTP2NNTP_MAILFROM='^.+@@(?:[^.]+\.)+[^.]+$'
     | LMTP2NNTP_NODENAME=`hostname`
     | LMTP2NNTP_OPERATIONMODE='post'
     | LMTP2NNTP_SIZE='800000'
     | LMTP2NNTP_TIMEOUT='nntp:connect=60'
     | LMTP2NNTP_NEWSGROUP='*'
d213 1
a213 11
     |         $LMTP2NNTP_PATH -D -P "/path/to/lmtp2nntp.pid" \
     |             -c "$LMTP2NNTP_CLIENTBIND" \
     |             -d "news.example.com" \
     |             -g "$LMTP2NNTP_GROUPMODE" \
     |             -l "$LMTP2NNTP_LOGLEVEL" \
     |             -m "$LMTP2NNTP_MAILFROM" \
     |             -n "$LMTP2NNTP_NODENAME" \
     |             -o "$LMTP2NNTP_OPERATIONMODE" \
     |             -s "$LMTP2NNTP_SIZE" \
     |             -t "$LMTP2NNTP_TIMEOUT" \
     |             "$LMTP2NNTP_NEWSGROUP"
d216 1
a216 1
     |         $LMTP2NNTP_PATH -K -P "/path/to/lmtp2nntp.pid"
d220 2
a221 4
  5. start lmtp2nntp daemon and reload Postfix to activate the new setup:

     $ lmtp2nntpd start
     $ postfix reload
d223 88
@


1.13
log
@Apply the standard OSSP copyright header, document ASCII art and fix
URL to lmtp2nntp homepage.
@
text
@d14 1
a14 1
      
d49 1
a49 1
     |   
d53 1
a53 1
     | 
@


1.12
log
@email address is valid having trailing dot; ricudis@@paiko.gr
@
text
@d1 6
a6 8

   _           _        ____              _         
  | |_ __ ___ | |_ _ __|___ \ _ __  _ __ | |_ _ __  
  | | '_ ` _ \| __| '_ \ __) | '_ \| '_ \| __| '_ \ 
  | | | | | | | |_| |_) / __/| | | | | | | |_| |_) |
  |_|_| |_| |_|\__| .__/_____|_| |_|_| |_|\__| .__/ 
                  |_|                        |_|    

@


1.11
log
@LMTP2NNTP_MAILER_MAX was renamed to LMTP2NNTP_MAILER_SIZE
@
text
@d44 1
a44 1
     | _DEFIFNOT(`LMTP2NNTP_MAILER_MAILFROM',      `^.+@@(?:[^.]+\.)+[^.]+$')
@


1.10
log
@Enhance installation instructions by adding Postix details.
@
text
@d58 1
a58 1
     |             L=990, T=DNS/RFC822/SMTP, M=LMTP2NNTP_MAILER_MAX,
@


1.9
log
@prepare INSTALL for release
@
text
@d12 1
d23 1
d27 4
a30 3
  (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.
d33 1
d77 2
d90 10
a99 1
  3. Add the following entries to both your virtual user table (file
d135 82
@


1.8
log
@Revamp command line options and their semantics (all daemons uppercase
now, all address options [a-d], etc):

o -D new option
o -k -> -K
o -p -> -P
o -b -> -c
o -a -> -b plus -
o -a new option
o -d -> -o
o -h -> -d
o -t name=value,...
o -w removed
@
text
@d34 12
a45 12
     | _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_OPERATIONMODE',`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',    `\*')
d56 2
a57 2
     |                         -b LMTP2NNTP_MAILER_BINDADDR dnl
     |                         -o LMTP2NNTP_MAILER_OPERATIONMODE dnl
d59 1
a59 1
     |                         -h $h dnl
d62 1
d64 1
a64 2
     |                         -l LMTP2NNTP_MAILER_LOGLEVEL dnl
     |                         -w LMTP2NNTP_MAILER_WAITTIME dnl
a65 2

     FIXME
@


1.7
log
@fix email address regex
@
text
@d38 1
a38 1
     | _DEFIFNOT(`LMTP2NNTP_MAILER_DELIVERYMODE', `post')
d57 1
a57 1
     |                         -d LMTP2NNTP_MAILER_DELIVERYMODE dnl
d66 2
@


1.6
log
@revamping and polishing documentation files for release
@
text
@d40 1
a40 1
     | _DEFIFNOT(`LMTP2NNTP_MAILER_MAILFROM',     `.+@@(?:[^.]+\.)+\.[^.]+')
@


1.5
log
@updated sendmail macros
@
text
@a0 59
   
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
______________________________________________________________________
d2 111
d114 1
a114 2
Add to your mailertable:
______________________________________________________________________
d116 4
a119 2
lmtp2nntp.invalid    lmtp2nntp:news.example.com
______________________________________________________________________
@


1.4
log
@typo
@
text
@a8 1

d11 2
a12 1
_DEFIFNOT(`LMTP2NNTP_MAILER_MAX',          `800000')
d15 6
a20 3
_DEFIFNOT(`LMTP2NNTP_MAILER_ARGS',         `')
_DEFIFNOT(`LMTP2NNTP_MAILER_GROUPS',       `\*')

d31 1
d33 1
d35 6
a40 3
                        -g LMTP2NNTP_MAILER_GROUPMODE dnl
                        LMTP2NNTP_MAILER_GROUPS

d56 3
a58 3
posting@@dev12.dev.de.cw.net    posting@@news-posting
posting+*@@dev12.dev.de.cw.net  %2@@news-posting
@@news.dev.de.cw.net            %1@@news-posting
d65 1
a65 1
news-posting    lmtp2nntp:news.de.cw.net
@


1.3
log
@fixed GROUPMODE_ENVELOPE foo+bar@@quux.com notation prefix stripping where sendmail passes us already rewritten <bar@@quux.com> as argument to "RCPT To:" command
@
text
@d16 1
a16 1
_DEFIFNOT(`LMTP2NNTP_MAILER_NEWSGROUPS',   `\*')
@


1.2
log
@More sendmail config required
@
text
@d27 6
a32 3
            A=lmtp2nntp -d LMTP2NNTP_MAILER_DELIVERYMODE dnl
                        -h $h -g LMTP2NNTP_MAILER_GROUPMODE dnl
                        LMTP2NNTP_MAILER_NEWSGROUPS
@


1.1
log
@Add first cut for INSTALL document with Sendmail info
@
text
@a12 1
_DEFIFNOT(`LMTP2NNTP_MAILER_NNTPSERVER',   `news')
d28 1
a28 2
                        -g LMTP2NNTP_MAILER_GROUPMODE dnl
                        -h LMTP2NNTP_MAILER_NNTPSERVER dnl
d34 2
d39 17
@

