Table of Contents

1 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 Mailman1 in a docker container without MTA in it.

It implements a slightly modified version of TCPMUX2 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.

2 Istallation

To build the program you will need GNU Make. Unpack the tarball, change to the source directory and run


To install the program, run

make install

as root. The binary will be installed in /usr/local/bin and the manpage in /usr/local/share/man/man1. To change these defaults, use the PREFIX variable. E.g. to install everything under /usr run

make install PREFIX=/usr

A number of variables is available to further fine-tune it:


    Default installation directory for the rpipe binary. Defaults to $(PREFIX)/bin.


    Default root directory for the manual pages. Defaults to $(PREFIX)/share/man.

  • MAN1DIR Installation directory for manuals in Section 1. Defaults to $(MANDIR)/man1.

3 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.

3.1 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. The 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.

3.2 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 symbol, so that your list setup becomes:

some-list:       "|/usr/bin/rpipe -a post some-list"
some-list-admin: "|/usr/bin/rpipe -a admin some-list"

Replace with the actual IP of the container.

4 Documentation

The documentaion for rpipe is available online.

5 Other references:

6 Bug reports

If you think you found a bug in rpipe or in its documentation, please send a mail to Sergey Poznyakoff or use the web bug tracker.

7 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 http://www.gnu.org/licenses/.


Author: Sergey Poznyakoff

Created: 2021-02-15 Mon 17:00

Emacs 25.3.1 (Org mode 8.2.10)