discard or moderate the post.
The syntax is quite simple: action[ [!]regexp]
-- "Action" can be "allow", "deny", "discard" or "moderate".
+- "Action" can be "allow", "send", "deny", "discard" or "moderate".
- The optional "!" makes the rule a match, if NO header matches the regular
expression.
- "Regexp" is a POSIX.2 extended regular expression. Matching is done case
mail may still be held for moderation, if it would have been so without access
rules.
+The action "send" will send the mail unconditionally. It will not be
+moderated.
+
The action "deny" will not send the mail to the mailing list, but will send a
rejection mail to the sender.
function as moderators in listdir/control/moderators
-The flow out of the access system is like this:
-
- |
- v
-+--------+ deny +--------+ discard +---------+
-| reject |<-------| access |---------->| discard |
-+--------+ +--------+ +---------+
- allow | | moderate
- | +-----------+
- v v
- +------------+ +------+
- | moderation |--->| hold |
- +------------+ +------+
- | |
- v |
- +------+ |
- | send |<---------+
- +------+
+The flow through the access system is like this:
+
+ deny +------+
+ +----------------->| deny |
+ | +------+
+ |
+ | discard +---------+
+ | +-------------->| discard |
+ | | +---------+
+ | | ^
+ | | | expire
+ +--------+ moderate +------+ +------+
+--->| access |----------->| hold |---------->| send |--->
+ +--------+ +------+ confirm +------+
+ | | ^ ^ ^
+ | | | yes | |
+ | | allow +------------+ no | |
+ | +-------------->| moderation |-------+ |
+ | +------------+ |
+ | send |
+ +------------------------------------------+
First a simple example. This rule set will reject any mail that is NOT plain
enum action {
ALLOW,
+ SEND,
DENY,
MODERATE,
DISCARD
if (strncmp(rule_ptr, "allow", 5) == 0) {
rule_ptr += 5;
act = ALLOW;
+ } else if (strncmp(rule_ptr, "send", 4) == 0) {
+ rule_ptr += 4;
+ act = SEND;
} else if (strncmp(rule_ptr, "deny", 4) == 0) {
rule_ptr += 4;
act = DENY;
}
startaccess:
+ if(!moderated)
+ moderated = statctrl(listdir, "moderated");
+
noaccessdenymails = statctrl(listdir, "noaccessdenymails");
access_rules = ctrlvalues(listdir, "access");
myfree(donemailname);
myfree(discardname);
exit(EXIT_SUCCESS);
+ } else if (accret == SEND) {
+ moderated = 0;
+ } else if (accret == ALLOW) {
+ /* continue processing as normal */
}
}
- if(!moderated)
- moderated = statctrl(listdir, "moderated");
if(moderated) {
mqueuename = concatstr(3, listdir, "/moderation/",
randomstr);