aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 70a3799b1771d78ca6dab7fbd92b6366df1173fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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 <http://www.gnu.org/licenses/>.

Footnotes
=========
[1] https://www.list.org
[2] https://tools.ietf.org/html/rfc1078

Return to:

Send suggestions and report system problems to the System administrator.