Overview ======== Rpipe is a simple tool for forwarding the content of the local file to the stdin of a program running on a remote host via TCP. The tool was created when I needed to run GNU Mailman[1] in a docker container without MTA in it. It implements a slightly modified version of TCPMUX[2] protocol. The same binary (rpipe) serves both as a server (on the remote end) and as a client (on the local end). See the Example section below. Installation ============ To install from the packaged version, the usual procedure applies: ./configure make sudo make install There is a number of options that modifies the behaviod of configure. The most important of them is '--prefix', which sets the installation prefix directory. By default, the installation prefix directory is '/usr/local', which means that the rpipe binary will be installed in '/usr/local/bin'. To install it in '/usr/bin', run ./configure --prefix=/usr For a detailed description of the installation procedure, refer to the INSTALL document in this directory. Installing from a cloned git version ------------------------------------ If you cloned the rpipe git repository, you will need GNU make and autotools to bootstrap the package. Change to the rpipe directory and run make. This will clone the necessary submodules, run autotools to prepare the build infrastructure, then it will configure and build the package. Example ======= The following configuration allows the system administrator to run mailman in a docker container and to distribute messages via the usual list mechanism using MTA on the host machine. Server configuration -------------------- The container exposes TCP port 1 and runs the following command: /usr/bin/rpipe -s -vv -udaemon -gsmmsp /opt/mailman/mail/mailman The `-s' option tells it to run as a server. The two `-v' options select maximal output verbosity. Diagnostics will be issued to the standard error. The `-u' and `-g' options specify the user and group to run mailman as. The only non-optional argument supplies the full pathname to the binary to run when a request is accepted from the client. For a detailed description of rpipe command line options, see rpipe(1). The rpipe utility runs in foreground. Client configuration -------------------- Normally Mailman-based mailing lists are configured as follows (using sendmail-style aliases): some-list: "|/opt/mailman/mail/mailman post some-list" some-list-admin: "|/opt/mailman/mail/mailman admin some-list" ... Just replace the program name after the pipe, so that your list setup becomes: some-list: "|/usr/bin/rpipe -a 172.17.0.2 post some-list" some-list-admin: "|/usr/bin/rpipe -a 172.17.0.2 admin some-list" ... Replace 172.17.0.2 with the actual IP of the container. License ======= 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 3, 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 program. If not, see . Footnotes ========= [1] https://www.list.org [2] https://tools.ietf.org/html/rfc1078