-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
279 lines (210 loc) · 10.9 KB
/
README
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
=========================== Minimalist =============================
I. Common information
Minimalist is a MINImalist MAiling LIST manager. It is fast, extremely easy
to setup and support. It is written in Perl and tested on OpenBSD/OpenSMTPd.
However there are no causes not to use Minimalist on any other Unix system,
because it doesn't use any system-dependent features.
Minimalist has these features:
. subscribe/unsubscribe users by request
* including write-only option of subscription
. read-only/closed/mandatory lists
. information about list; users, subscribed to list; lists, to which user
subscribed
. per-user options:
* read-only (for open lists)
* write allow (for read-only lists))
* maximum message size
. susped/resume subscription
. archiving lists (internal and external), with maximum size of archived
message
. multilanguage support
. process MIME-encoded messages
* including support for local charset (for reports and footer)
. hook for bounce processing (using VERP - Variable Envelope Return-Path)
. external delivery of processed message
. blacklist
. logging activity
Minimalist has a notion of 'administrators' (global and per-list). They
have full rights to manipulate subscription of other users and get any
information, related to lists and users.
Basic language of Minimalist is English, additional translations can be found
either in distribution (in directory translations/) or on Web, at
https://github.com/madroach/minimalist/tree/master/translations.
New translations can easily be created using an existing translation as
template. See alse perl Maketext: http://perldoc.perl.org/Locale/Maketext.html
Commands may be either in subject of message (one command per message)
or in body (one or more commands, one per line). Batched processing starts
when subject either empty or contains command 'body' (without quotes) and
stops when either arrives command 'stop' or 'exit' (without quotes) or
gets 10 incorrect commands.
Supported commands are:
subscribe <list> [<email>] :
Subscribe user to <list>. If <list> contains suffix '-writers', user
will be able to write to this <list>, but will not receive messages
from it.
unsubscribe <list> [<email>] :
Unsubscribe user from <list>. Can be used with suffix '-writers' (see
above description for subscribe)
auth <code> :
Confirm command, used in response to subscription requests in some cases.
This command isn't standalone, it must be used only in response to a
request by Minimalist.
mode <list> <email> <mode> :
Set mode for specified user on specified list. Allowed only for
administrator. Mode can be (without quotes):
* 'reader' - read-only access to the list for the user;
* 'writer' - user can post messages to the list regardless of list's
status
* 'usual' - clear any two above mentioned modes
* 'suspend' - suspend user subscription
* 'resume' - resume previously suspended permission
* 'maxsize <size>' - set maximum size (in bytes) of messages, which
user wants to receive
* 'reset' - clear all modes for specified user
suspend <list> :
(obsolete) Stop receiving of messages from specified mailing list
resume <list> :
(obsolete) Restore receiving of messages from specified mailing list
maxsize <list> <size> :
(obsolete) Set maximum size (in bytes) of messages, which user wants to receive
which [<email>] :
Return list of lists to which user is subscribed
info [<list>] :
Request information about all existing lists or about <list>
who <list> :
Return the list of users subscribed to <list>
help :
Return list of supported commands with brief description about every
command
Note, that commands with <email>, 'who' and 'mode' can only be used by
administrators (users identified in the 'mailfrom' authentication scheme or
who used a correct password - either global or local). Otherwise command will
be ignored. Password must be supplied in any header of message as fragment
of the header in the following format:
{pwd: list_password}
For example:
To: MML Discussion {pwd: password1235} <mml-general\@kiev.sovam.com>
This fragment, of course, will be removed from the header before sending
message to subscribers.
----------------------------------------------------------------------------
II. Install
To install, place minimalist.pl somewhere (in /usr/local/sbin for example).
This path must be accessible for MTA and minimalist.pl must be executable
by your MTA. It is recommended to set the script suid root. Minimalist will
then chroot and then drop privileges to the user set in the config file or to
its real uid.
Then copy minimalist.conf to /etc/minimalist.conf. If you wish to have it in
different location, you will use '-c' command-line directive, followed by full
path and name of file, where appropriate config located (for example:
minimalist.pl -c /etc/minimalist.conf ). Set variables in config accordingly to
your needs (defaults are useful in most cases).
The next step is to create alias for minimalist, which pipes received
message to the program. The often place of aliases file is /etc/aliases.
Add this line at the end of file:
minimalist: |/usr/local/sbin/minimalist.pl
(if your MTA adds a delivered-to: header)
or if it doesn't:
minimalist: "|/usr/local/sbin/minimalist.pl minimalist"
and, if your MTA requires, do all it need to actualize changes.
After this you must create a directory which Minimalist will use for work.
It is defined in the minimalist.conf by directive 'directory'. In this
directory you need at least "lists" and "auth" subdirectorys. Optionally you
can create a "translations" subdirectory where you can put perl Maketext
translation files. Of course all directories need to be readable by
minimalist. The auth directory must also be writable.
----------------------------------------------------------------------------
III. Creating lists
1. In the "lists" directory, create a directory, named exactly as the
list you are creating. In this directory minimalist probably needs write
access to files "list", "list-writers" and maybe the directory "archive".
2. Create in the list's directory some files:
An example can be found in the distributions
"lists/minimalist-example" directory.
a) config
Private settings for this list, they override global parameters.
b) info
Common information about list, used when user subscribes to the list
and requests information about list.
c) footer
This file will be appended to any message, passed through list. There
are few ways in which footer can be added to message:
* if message is not encoded (i.e. if it's 7bit or 8bit), message's
charset is the same as list's charset or list's charset is default
(us-ascii) and footer doesn't contain any predefined MIME-headers
(see below), then footer will be simply added to the end of the
incoming message.
* else entire message will be converted to MIME-format and footer
will be added as separate entity, with his own charset (from
configuration or from predefined headers).
* if message is already MIME-encoded, then footer will be added as
separate entity, accordingly to structure of incoming message.
It means, that footer will always be visible regardless of attachments
in message or encoding of message or charset, used in message.
If you want to define your own headers, start footer with string
'*hdr: ' (without quotes), followed by headers. Body of footer must be
separated from header with empty line, for example:
+--------------------------------------------------------
|*hdr: Content-Type: text/html; charset=koi8-r
|Content-Transfer-Encoding: 8bit
|
|<html>
|... rest body of header ...
|</html>
+--------------------------------------------------------
It gives ability to use in footer whatever you want, from HTML code,
which has references to some other resources, to animated GIFs or
Flash programs.
There are some useful macros can be used in 'info' and 'footer' files:
\a will be expanded to administrator's email
\d will be expanded to <domain>
\l will be expanded to <list>
\o will be expanded to <list>-owner@<domain>
4. Add list's aliases to /etc/aliases file:
minimalist-example: |/usr/local/sbin/minimalist.pl
minimalist-example-owner: user@somewhere
(if your MTA adds a delivered-to: header)
or if it doesn't:
minimalist-example: "|/usr/local/sbin/minimalist.pl list"
minimalist-example-owner: user@somewhere
If you are using VERP for bounce processing (see minimalist.conf for
information about directive 'verp'), you must add one more alias, something
like to:
minimalist-example-owner-*: |/path/to/bounce_processing_tool.pl
Wildcard mask specifies, that any message, where recipient's address starts
on 'list-owner-', will be passed to bounce_processing_tool.pl. Check your
MTA documentation on how to create wildcard aliases.
Distribution of Minimalist does not provide bounce processing program for
now. You should use any third-party program.
----------------------------------------------------------------------------
IV. Check configuration
You always can check your configuration with:
minimalist.pl - [listname [listname ... ]]
where 'listname' is existing list's name. If there are errors in they will
be reported. It is recommended always check configuration after any
changes either in global configuration file or in list's config.
----------------------------------------------------------------------------
V. Security
Information on how to get administrative privileges may be stored in global
and private configs. You must set owner and permissions of this configs to
allow minimalist to access these configs, but disallow access for unprivileged
users.
If run setuid root, minimalist will read the main configuration before
chrooting, so you may set more restrictive permissions on that file.
----------------------------------------------------------------------------
VI. Internals
Subscribers are listed in files 'list' and 'list-writers' in list's
directory. Format: e-mail per row. Settings for subscriber are appended to
his e-mail through separator '>'. Available values are (without quotes):
'+' - user allowed to write in read only list (mode ... writer)
'-' - user disallowed to write in list (mode ... reader)
'!' - suspended user (suspend/resume, mode ... suspend/resume)
'#ms<size>' - maximum size in bytes of messages for user
Archives are located under list's directory in archive/yyyy./mm./dd./[0-9]*
in format one file per one message. DON'T DELETE "SEQUENCE" file in this
directory - there is a number of a last archived message!
VII. Enjoy :)
There is mailing list about Minimalist. Please, mail to
with subject of 'subscribe mml-general' to subscribe on this list.
Vladimir Litovka, <[email protected]>
http://www.mml.org.ua/