annotate README.access @ 919:e371a935a0cd default tip master

Added tag RELEASE_1_3_0 for changeset 570dd6d4942b
author Ben Schmidt
date Thu, 25 May 2017 09:08:47 +1000
parents c6fe438f3e60
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
1 README.access present in mlmmj versions >= 0.8.0
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
2 (moderate tag since 1.1.0-RC3)
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
3 Access control in mlmmj
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
4 =======================
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
5
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
6 If the file listdir/control/access is present, access control is enabled.
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
7
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
8 NOTE: the default action is to deny access (reject the mail), so an empty
261
2effd474394e more release stuff
mmj
parents: 256
diff changeset
9 access control file will cause mlmmj to reject all posts, whereas a non-
2effd474394e more release stuff
mmj
parents: 256
diff changeset
10 existant file will change nothing, and mlmmj will behave as usual.
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
11
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
12 Each header in the mail is tested against each rule, rule by rule. That is,
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
13 all headers are first tested against the first rule, then all headers are
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
14 tested against the second rule, and so on.
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
15
640
3770bb64ea17 Added support for 'discard' keyword in access rules (Sascha Sommer)
mortenp
parents: 387
diff changeset
16 The first rule to match a header decides which action to take - allow, deny,
3770bb64ea17 Added support for 'discard' keyword in access rules (Sascha Sommer)
mortenp
parents: 387
diff changeset
17 discard or moderate the post.
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
18
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
19 The syntax is quite simple: action[ [!]regexp]
719
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
20 - "Action" can be "allow", "send", "deny", "discard" or "moderate".
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
21 - The optional "!" makes the rule a match, if NO header matches the regular
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
22 expression.
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
23 - "Regexp" is a POSIX.2 extended regular expression. Matching is done case
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
24 insensitive.
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
25
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
26 The action "allow" will pass the mail on to the next step in processing. The
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
27 mail may still be held for moderation, if it would have been so without access
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
28 rules.
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
29
719
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
30 The action "send" will send the mail unconditionally. It will not be
842
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
31 moderated, nor subject to subonlypost, nor modnonsubposts.
719
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
32
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
33 The action "deny" will not send the mail to the mailing list, but will send a
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
34 rejection mail to the sender.
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
35
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
36 The action "discard" will not send the mail to the list, and will not send a
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
37 rejection mail.
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
38
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
39 The action "moderate" will hold the mail for moderation.
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
40
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
41 IMPORTANT: if "moderate" is used then don't forget to add people who should
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
42 function as moderators in listdir/control/moderators
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
43
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
44
842
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
45 The flow through the access system is something like this:
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
46
719
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
47 deny +------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
48 +----------------->| deny |
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
49 | +------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
50 |
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
51 | discard +---------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
52 | +-------------->| discard |
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
53 | | +---------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
54 | | ^
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
55 | | | expire
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
56 +--------+ moderate +------+ +------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
57 --->| access |----------->| hold |---------->| send |--->
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
58 +--------+ +------+ confirm +------+
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
59 | | ^ ^ ^
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
60 | | | yes | |
842
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
61 | | allow +--------------+ no | |
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
62 | +-------------->| moderation * |-----+ |
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
63 | +--------------+ |
719
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
64 | send |
30e6e309891d Added "send" keyword to control/access handling (Ben Schmidt)
mortenp
parents: 717
diff changeset
65 +------------------------------------------+
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
66
842
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
67 * modnonsubposts is also processed here, and subonlypost (the flow
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
68 may be to deny or discard for subonlypost without modnonsubposts).
c6fe438f3e60 Fix access logic so subonlypost doesn't override a send access rule.
Ben Schmidt
parents: 719
diff changeset
69
717
7e1127e22936 added description of the keywords, added flow graph
mortenp
parents: 640
diff changeset
70
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
71 First a simple example. This rule set will reject any mail that is NOT plain
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
72 text, or has a subject that contains "BayStar", and allow anything else:
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
73
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
74 deny !^Content-Type: text/plain
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
75 deny ^Subject:.*BayStar
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
76 allow
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
77
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
78 To allow only text mails, but have the moderators moderate every html mail one
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
79 would use this:
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
80
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
81 allow ^Content-Type: text/plain
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
82 moderate ^Content-Type: text/html
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
83 deny
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
84
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
85 Now on to a more advanced example. Morten can post anything, Mads Martin can
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
86 post if the subject does not contain "SCO". Everything else is denied:
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
87
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
88 allow ^From: Morten
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
89 deny ^Subject:.*SCO
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
90 allow ^From: Mads Martin
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
91 deny
256
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
92
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
93 The last rule (deny) can be left out, as deny is the default action.
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
94
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
95 A third example. Deny any mails with "discount", "weightloss", or "bonus" in
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
96 the subject. Allow PGP signed and plain text mails. Anything else is denied:
b38c16a4628b initial revision (mmj, please review)
mortenp
parents:
diff changeset
97
387
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
98 deny ^Subject:.*discount
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
99 deny ^Subject:.*weightloss
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
100 deny ^Subject:.*bonus
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
101 allow ^Content-Type: multipart/signed
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
102 allow ^Content-Type: text/plain
76232e610354 1.1.0-RC3 prep
mmj
parents: 263
diff changeset
103