From badbdca44c57d9877c2bd4c96432ecd3d2a7fe0a Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Tue, 13 Mar 2012 13:56:37 -0700 Subject: Add overview document based on PyCon sprint briefing by Barry Warsaw. --- src/mailman/docs/8-miles-high.rst | 122 ++++++++++++++++++++++++++++++++++++++ src/mailman/docs/chains.png | Bin 0 -> 94396 bytes src/mailman/docs/msg-flow.png | Bin 0 -> 37383 bytes src/mailman/docs/pipeline.png | Bin 0 -> 56391 bytes 4 files changed, 122 insertions(+) create mode 100644 src/mailman/docs/8-miles-high.rst create mode 100644 src/mailman/docs/chains.png create mode 100644 src/mailman/docs/msg-flow.png create mode 100644 src/mailman/docs/pipeline.png (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst new file mode 100644 index 000000000..1d8d2645c --- /dev/null +++ b/src/mailman/docs/8-miles-high.rst @@ -0,0 +1,122 @@ +======================================== +Notes from the PyCon 2012 Mailman Sprint +======================================== + +.. authorship + The notes are based on Barry Warsaw's description of the Mailman 3 + pipeline at the PyCon 2012 Mailman sprint on March 13, with + diagrams from his "Mailman" presentation at PyCon 2012. + Transcribed by Stephen Turnbull. + +These are notes from the Mailman sprint at PyCon 2012. They are not +terribly well organized, nor fully fleshed out. Please edit and push +branches to Launchpad at lp:mailman or post patches to . + +The intent of this document is to provide a view of Mailman 3's +workflow and structures from "eight miles high". + + +Basic Messaging Handling Workflow +--------------------------------- + +Mailman accepts a message via the LMTP protocol (RFC 2033). It +implements a simple LMTP server internally based on the LMTP server +provided in the Python stdlib. The LMTP server's responsibility is to +parse the message into a tuple (*mlist*, *msg*, *msg_data*). If the +parse fails (including messages which Mailman considers to be invalid +due to lack of Message-Id as strongly recommended by RFC 2822 and RFC +5322), the message will be rejected, otherwise the tuple is pickled, +and the resulting *message pickle* added to one of the IN, COMMAND, or +BOUNCE processing queues. + +.. image:: msg-flow.png + :scale: 75 + +The IN queue is processed by *filter chains* (explained below) to +determine whether the post (or administrative request) will be +processed. If not allowed, the message pickle is discarded, rejected +(returned to sender), or held (added to the MODERATION queue -- not +shown). Otherwise the message is added to the POSTING queue. + +Each of the COMMAND, BOUNCE, and POSTING queues is processed by a +*pipeline of handlers* as in Mailman 2's pipeline. (Some functions +such as spam detection that were handled in the Mailman 2 pipeline are +now in the filter chains.) + +Handlers may copy messages to other queues (*e.g.*, ARCHIVE), and +eventually posts for distribution end up in the OUT queue for +injection into the MTA. + +The VIRGIN queue is a special queue for messages created by Mailman. + +.. image:: pipeline.png + :scale: 67 + + +Message Filtering +----------------- + +Once a message has been classified as a post or administrivia, rules +are applied to determine whether the message should be distributed or +acted on. Rules include things like "if the message's sender is a +non-member, hold it for moderation", or "if the message contains an +Approved field with a valid password, distribute it". A rule may also +make no decision, in which case the message pickle is passed on to the +next rule in the filter chain. + +.. image:: chains.png + :scale: 67 + + +Configuration +------------- + +Uses lazr.config. + +Each Runner's configuration object knows whether it should be started +when the Mailman daemon starts, and what queue the Runner manages. + + +Shell Commands +-------------- + +bin/mailman: This is an ubercommand, with subcommands for all the +various things admins might want to do, similar to mailmanctl, but +with more functionality. + +bin/master: The runner manager: starts, watches, stops the runner +daemons. + +bin/runner: Individual runner daemons. Each instance is configured +with a configure object specified on the command line, and other +command line options. + + +User Model +---------- + +A *user* represents a person. A user has an *id* and a *display +name*, and a list of addresses. + +Each *address* is a separate object, linked to a user with a user id. + +A list *member* is a link from a user to a mailing list. Each list +member has a user id, a mailing list name, an address (which may be +None, which will be replaced by the user's preferred address, a list +of preferences, and a *role* such as "owner" or "moderator". Roles +are used to determine what kinds of mail the user receives via that +membership. *Owners* will receive mail to *list*-owner, but not posts +and moderation traffic, for example. A user with multiple roles on a +single list will therefore have multiple memberships in that list, one +for each role. + +Roles are implemented by "magical, invisible" *rosters*. + + +List Styles +----------- + +Each list *style* is a named object. Its attributes are functions +used to apply the relevant style settings to the mailing list *at +creation time*. Since these are functions, they can be composed in +various ways, to create substyles, *etc*. diff --git a/src/mailman/docs/chains.png b/src/mailman/docs/chains.png new file mode 100644 index 000000000..570cc4597 Binary files /dev/null and b/src/mailman/docs/chains.png differ diff --git a/src/mailman/docs/msg-flow.png b/src/mailman/docs/msg-flow.png new file mode 100644 index 000000000..3affeee8a Binary files /dev/null and b/src/mailman/docs/msg-flow.png differ diff --git a/src/mailman/docs/pipeline.png b/src/mailman/docs/pipeline.png new file mode 100644 index 000000000..0e5c9d984 Binary files /dev/null and b/src/mailman/docs/pipeline.png differ -- cgit v1.2.3-70-g09d2 From 5d1473a9477b658ddccff9c9dea46f23f6dac682 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Tue, 13 Mar 2012 21:08:37 -0700 Subject: Sphinxify docs: add conf.py, contents.rst. Replace msg-flow.png with inline graphviz. Add inline graphviz for pipeline.png and chains.png (not ready for prime time). --- src/mailman/docs/8-miles-high.rst | 74 +++++++++++++++++++++++++++++++++++++-- src/mailman/docs/conf.py | 3 ++ src/mailman/docs/contents.rst | 4 +++ 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 src/mailman/docs/conf.py create mode 100644 src/mailman/docs/contents.rst (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 1d8d2645c..320a76dfc 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -29,8 +29,20 @@ due to lack of Message-Id as strongly recommended by RFC 2822 and RFC and the resulting *message pickle* added to one of the IN, COMMAND, or BOUNCE processing queues. -.. image:: msg-flow.png - :scale: 75 +.. graphviz:: + + digraph msgflow { + rankdir = LR; + node [shape=box, color=lightblue, style=filled]; + msg [shape=ellipse, color=black, fillcolor=white]; + lmtpd [label="LMTP\nSERVER"]; + msg -> MTA [label="SMTP"]; + MTA -> lmtpd [label="LMTP"]; + lmtpd -> MTA [label="reject"]; + lmtpd -> IN -> POSTING [label=".pck"]; + lmtpd -> BOUNCES [label=".pck"]; + lmtpd -> COMMAND [label=".pck"]; + } The IN queue is processed by *filter chains* (explained below) to determine whether the post (or administrative request) will be @@ -52,6 +64,11 @@ The VIRGIN queue is a special queue for messages created by Mailman. .. image:: pipeline.png :scale: 67 +.. graphviz:: + + digraph pipeline { + } + Message Filtering ----------------- @@ -67,6 +84,57 @@ next rule in the filter chain. .. image:: chains.png :scale: 67 +.. builtin chain [shape=none] + accept chain [shape=none] + hold chain [shape=none] + discard chain [shape=none] + moderation chain [shape=none] + +.. graphviz:: + + digraph chains { + rankdir=TB; + approved [shape=record, label=" approved | { | }"]; + emergency [shape=record, label=" emergency | { | }"]; + loop [shape=record, label=" loop | { | }"]; + modmember [shape=record, label=" moderate\nmember | { | }"]; + administrivia [shape=record, label=" administrivia | "]; + maxsize [shape=record, label=" max\ size | { | }"]; + any [shape=record, label=" any | { | }"]; + truth [shape=record, label=" truth | "]; + IN [shape=box, color=lightblue, style=filled]; + IN -> approved; + subgraph clusterbar { + rank=same; + subgraph clusterfubar { + rank=same; + approved:f2 -> emergency; + emergency:f2 -> loop; + loop:f2 -> modmember; + modmember:f2 -> administrivia; + administrivia:f2 -> maxsize; + maxsize:f2 -> any; + any:f2 -> truth; + }; + clusterfoo [shape=none]; + subgraph clusterfoo { + rankdir=LR; + rank=same; + APPROVED [shape=box, color=lightblue, style=filled]; + POSTING [shape=box, color=lightblue, style=filled]; + MODERATION [shape=box, color=lightblue, style=filled]; + DISCARD [shape=trapezoidium, color=lightblue, style=filled]; + }; + }; + approved:f1 -> POSTING; + emergency:f1 -> MODERATION; + loop:f1 -> DISCARD; + modmember:f1 -> MODERATION; + maxsize:f1 -> MODERATION; + any:f1 -> MODERATION; + truth -> POSTING; + } + Configuration ------------- @@ -107,7 +175,7 @@ of preferences, and a *role* such as "owner" or "moderator". Roles are used to determine what kinds of mail the user receives via that membership. *Owners* will receive mail to *list*-owner, but not posts and moderation traffic, for example. A user with multiple roles on a -single list will therefore have multiple memberships in that list, one +single list will theref1re have multiple memberships in that list, one for each role. Roles are implemented by "magical, invisible" *rosters*. diff --git a/src/mailman/docs/conf.py b/src/mailman/docs/conf.py new file mode 100644 index 000000000..56ecec975 --- /dev/null +++ b/src/mailman/docs/conf.py @@ -0,0 +1,3 @@ +project = "Workflow Overview" + +extensions = ["sphinx.ext.graphviz"] diff --git a/src/mailman/docs/contents.rst b/src/mailman/docs/contents.rst new file mode 100644 index 000000000..458ed26ad --- /dev/null +++ b/src/mailman/docs/contents.rst @@ -0,0 +1,4 @@ +.. toctree:: + :maxdepth: 2 + + 8-miles-high -- cgit v1.2.3-70-g09d2 From 1334c986781a152449396c6a2fbc1a566ba92472 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Wed, 14 Mar 2012 13:04:30 -0700 Subject: Revert errors='' change for 2.6 compatibility. --- src/mailman/runners/command.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mailman/runners/command.py b/src/mailman/runners/command.py index f13b02229..ac611ed3a 100644 --- a/src/mailman/runners/command.py +++ b/src/mailman/runners/command.py @@ -85,7 +85,7 @@ class CommandFinder: # bogus characters. Otherwise, there's nothing in the subject # that we can use. if isinstance(raw_subject, unicode): - safe_subject = raw_subject.encode('us-ascii', errors='ignore') + safe_subject = raw_subject.encode('us-ascii', 'ignore') self.command_lines.append(safe_subject) # Find the first text/plain part of the message. part = None @@ -119,7 +119,7 @@ class CommandFinder: # ASCII commands and arguments, ignore anything else. parts = [(part if isinstance(part, unicode) - else part.decode('ascii', errors='ignore')) + else part.decode('ascii', 'ignore')) for part in parts] yield parts @@ -139,7 +139,7 @@ The results of your email command are provided below. def write(self, text): if not isinstance(text, unicode): - text = text.decode(self.charset, errors='ignore') + text = text.decode(self.charset, 'ignore') self._output.write(text) def __unicode__(self): -- cgit v1.2.3-70-g09d2 From 6376aa2baf2b3bfb70d9be8710739df09663c20d Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Wed, 14 Mar 2012 13:49:09 -0700 Subject: Combine my sprint work into Andrea's. Add 8-miles-high.rst. Remove my temporary contents.rst list and conf.py. Adds chains.png, pipeline.png, msg-flow.png -- probably temporarily. --- README.rst | 1 + conf.py | 4 +++- src/mailman/docs/conf.py | 3 --- src/mailman/docs/contents.rst | 4 ---- 4 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 src/mailman/docs/conf.py delete mode 100644 src/mailman/docs/contents.rst (limited to 'src') diff --git a/README.rst b/README.rst index 9c9b026c6..186062e53 100644 --- a/README.rst +++ b/README.rst @@ -37,6 +37,7 @@ Table of Contents src/mailman/docs/START src/mailman/docs/DATABASE src/mailman/docs/MTA + src/mailman/docs/8-miles-high src/mailman/bin/docs/* src/mailman/commands/docs/* src/mailman/database/docs/* diff --git a/conf.py b/conf.py index 6b137541a..56b458ff8 100644 --- a/conf.py +++ b/conf.py @@ -25,7 +25,9 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx.ext.graphviz'] # Add any paths that contain templates here, relative to this directory. # templates_path = ['_templates'] diff --git a/src/mailman/docs/conf.py b/src/mailman/docs/conf.py deleted file mode 100644 index 56ecec975..000000000 --- a/src/mailman/docs/conf.py +++ /dev/null @@ -1,3 +0,0 @@ -project = "Workflow Overview" - -extensions = ["sphinx.ext.graphviz"] diff --git a/src/mailman/docs/contents.rst b/src/mailman/docs/contents.rst deleted file mode 100644 index 458ed26ad..000000000 --- a/src/mailman/docs/contents.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. toctree:: - :maxdepth: 2 - - 8-miles-high -- cgit v1.2.3-70-g09d2 From 26844dc61b6bc8f31801ce65cc56ce0462482139 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Wed, 14 Mar 2012 16:22:18 -0700 Subject: Improved layout of graphviz version of chains. --- src/mailman/docs/8-miles-high.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 320a76dfc..973d26dbd 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -93,7 +93,7 @@ next rule in the filter chain. .. graphviz:: digraph chains { - rankdir=TB; + rankdir=LR; approved [shape=record, label=" approved | { | }"]; emergency [shape=record, label=" emergency | { | }"]; loop [shape=record, label=" loop | { | }"]; @@ -102,11 +102,11 @@ next rule in the filter chain. maxsize [shape=record, label=" max\ size | { | }"]; any [shape=record, label=" any | { | }"]; truth [shape=record, label=" truth | "]; - IN [shape=box, color=lightblue, style=filled]; + IN [shape=box, color=lightblue, style=filled, rank=source]; IN -> approved; - subgraph clusterbar { - rank=same; - subgraph clusterfubar { + subgraph fubar { + subgraph bar { + /* rankdir=TB; */ rank=same; approved:f2 -> emergency; emergency:f2 -> loop; @@ -116,9 +116,8 @@ next rule in the filter chain. maxsize:f2 -> any; any:f2 -> truth; }; - clusterfoo [shape=none]; - subgraph clusterfoo { - rankdir=LR; + subgraph foo { + /* rankdir=TB; */ rank=same; APPROVED [shape=box, color=lightblue, style=filled]; POSTING [shape=box, color=lightblue, style=filled]; -- cgit v1.2.3-70-g09d2 From 6dd90389fe283a268cb5eb36e5abb93991601110 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Thu, 15 Mar 2012 11:51:48 -0700 Subject: source, chains, sink subgraphs form --- src/mailman/docs/8-miles-high.rst | 84 ++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 973d26dbd..fc0801def 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -92,46 +92,50 @@ next rule in the filter chain. .. graphviz:: - digraph chains { + digraph chain_rules { rankdir=LR; - approved [shape=record, label=" approved | { | }"]; - emergency [shape=record, label=" emergency | { | }"]; - loop [shape=record, label=" loop | { | }"]; - modmember [shape=record, label=" moderate\nmember | { | }"]; - administrivia [shape=record, label=" administrivia | "]; - maxsize [shape=record, label=" max\ size | { | }"]; - any [shape=record, label=" any | { | }"]; - truth [shape=record, label=" truth | "]; - IN [shape=box, color=lightblue, style=filled, rank=source]; - IN -> approved; - subgraph fubar { - subgraph bar { - /* rankdir=TB; */ - rank=same; - approved:f2 -> emergency; - emergency:f2 -> loop; - loop:f2 -> modmember; - modmember:f2 -> administrivia; - administrivia:f2 -> maxsize; - maxsize:f2 -> any; - any:f2 -> truth; - }; - subgraph foo { - /* rankdir=TB; */ - rank=same; - APPROVED [shape=box, color=lightblue, style=filled]; - POSTING [shape=box, color=lightblue, style=filled]; - MODERATION [shape=box, color=lightblue, style=filled]; - DISCARD [shape=trapezoidium, color=lightblue, style=filled]; - }; - }; - approved:f1 -> POSTING; - emergency:f1 -> MODERATION; - loop:f1 -> DISCARD; - modmember:f1 -> MODERATION; - maxsize:f1 -> MODERATION; - any:f1 -> MODERATION; - truth -> POSTING; + { rank=same; IN; approved; POSTING; } + { rank=same; loop; DISCARD; } + { rank=same; modmember; MODERATION; } + subgraph source { + IN [shape=box, color=lightblue, style=filled]; + IN -> approved; + } + subgraph chains { + rank=same; + rankdir=TB; + approved [shape=record, label=" approved | { | }"]; + emergency [shape=record, label=" emergency | { | }"]; + loop [shape=record, label=" loop | { | }"]; + modmember [shape=record, label=" moderate\nmember | { | }"]; + administrivia [shape=record, label=" administrivia | "]; + maxsize [shape=record, label=" max\ size | { | }"]; + any [shape=record, label=" any | { | }"]; + truth [shape=record, label=" truth | "]; + approved:f1 -> emergency [weight=10]; + emergency:f1 -> loop [weight=10]; + loop:f1 -> modmember [weight=10]; + modmember:f1 -> administrivia [weight=10]; + administrivia:f1 -> maxsize [weight=10]; + maxsize:f1 -> any [weight=10]; + any:f1 -> truth [weight=10]; + } + subgraph sinks { + rankdir=TB; + /* APPROVED [shape=box, color=lightblue, style=filled]; */ + POSTING [shape=box, color=lightblue, style=filled]; + MODERATION [shape=box, color=lightblue, style=filled]; + DISCARD [shape=trapezoidium, color=lightblue, style=filled]; + } + /* + approved:f2 -> POSTING [weight=0]; + emergency:f2 -> MODERATION [weight=0]; + loop:f2 -> DISCARD [weight=0]; + modmember:f2 -> MODERATION [weight=0]; + maxsize:f2 -> MODERATION [weight=0]; + any:f2 -> MODERATION [weight=0]; + truth -> POSTING [weight=0]; + */ } @@ -174,7 +178,7 @@ of preferences, and a *role* such as "owner" or "moderator". Roles are used to determine what kinds of mail the user receives via that membership. *Owners* will receive mail to *list*-owner, but not posts and moderation traffic, for example. A user with multiple roles on a -single list will theref1re have multiple memberships in that list, one +single list will therefore have multiple memberships in that list, one for each role. Roles are implemented by "magical, invisible" *rosters*. -- cgit v1.2.3-70-g09d2 From 57454b29a5a2fdfe130221e014ceedb025018292 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Thu, 15 Mar 2012 14:24:01 -0700 Subject: groups help --- src/mailman/docs/8-miles-high.rst | 80 +++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index fc0801def..9d12447e9 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -93,49 +93,47 @@ next rule in the filter chain. .. graphviz:: digraph chain_rules { - rankdir=LR; - { rank=same; IN; approved; POSTING; } - { rank=same; loop; DISCARD; } - { rank=same; modmember; MODERATION; } - subgraph source { - IN [shape=box, color=lightblue, style=filled]; - IN -> approved; + rankdir=LR /* This gives the right orientation of the columns. */ + rank=same + subgraph in { IN [shape=box, color=lightblue, style=filled] } + subgraph rules { + rankdir=TB + rank=same + node [shape=record] + approved [group=0, label=" approved | { | }"] + emergency [group=0, label=" emergency | { | }"] + loop [group=0, label=" loop | { | }"] + modmember [group=0, label=" member\nmoderated | { | }"] + administrivia [group=0, label=" administrivia | "] + maxsize [group=0, label=" max\ size | { | }"] + any [group=0, label=" any | { | }"] + truth [label=" truth | "] + approved:f1 -> emergency:f0 [weight=100] + emergency:f1 -> loop:f0 + loop:f1 -> modmember:f0 + modmember:f1 -> administrivia:f0 + administrivia:f1 -> maxsize:f0 + maxsize:f1 -> any:f0 + any:f1 -> truth:f0 } - subgraph chains { - rank=same; - rankdir=TB; - approved [shape=record, label=" approved | { | }"]; - emergency [shape=record, label=" emergency | { | }"]; - loop [shape=record, label=" loop | { | }"]; - modmember [shape=record, label=" moderate\nmember | { | }"]; - administrivia [shape=record, label=" administrivia | "]; - maxsize [shape=record, label=" max\ size | { | }"]; - any [shape=record, label=" any | { | }"]; - truth [shape=record, label=" truth | "]; - approved:f1 -> emergency [weight=10]; - emergency:f1 -> loop [weight=10]; - loop:f1 -> modmember [weight=10]; - modmember:f1 -> administrivia [weight=10]; - administrivia:f1 -> maxsize [weight=10]; - maxsize:f1 -> any [weight=10]; - any:f1 -> truth [weight=10]; + subgraph queues { + rankdir=TB + rank=same + node [shape=box, color=lightblue, style=filled]; + POSTING; + DISCARD; + MODERATION; } - subgraph sinks { - rankdir=TB; - /* APPROVED [shape=box, color=lightblue, style=filled]; */ - POSTING [shape=box, color=lightblue, style=filled]; - MODERATION [shape=box, color=lightblue, style=filled]; - DISCARD [shape=trapezoidium, color=lightblue, style=filled]; - } - /* - approved:f2 -> POSTING [weight=0]; - emergency:f2 -> MODERATION [weight=0]; - loop:f2 -> DISCARD [weight=0]; - modmember:f2 -> MODERATION [weight=0]; - maxsize:f2 -> MODERATION [weight=0]; - any:f2 -> MODERATION [weight=0]; - truth -> POSTING [weight=0]; - */ + + IN -> approved:f0 + approved:f2 -> POSTING + /* loop:f2 -> DISCARD */ + modmember:f2 -> MODERATION + + emergency:f2:e -> MODERATION [weight=0] + maxsize:f2 -> MODERATION [weight=0] + any:f2 -> MODERATION [weight=0] + truth:f1 -> POSTING [weight=0] } -- cgit v1.2.3-70-g09d2 From 7c0bf1dc90dc9e7b2d242532ba644ab958ce5a17 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Thu, 15 Mar 2012 15:00:22 -0700 Subject: We gots a graphviz! Now WAT?! --- src/mailman/docs/8-miles-high.rst | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 9d12447e9..3cd97d9eb 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -61,12 +61,18 @@ injection into the MTA. The VIRGIN queue is a special queue for messages created by Mailman. -.. image:: pipeline.png - :scale: 67 - .. graphviz:: digraph pipeline { + node [shape=box, style=rounded, group=0] + { "MIME\ndelete" -> "cleanse headers" -> "add headers" -> \ + "calculate\nrecipients" -> "to digest" -> "to archive" -> \ + "to outgoing" } + node [shape=box, color=lightblue, style=filled, group=1] + { rank=same; POSTING -> "MIME\ndelete" } + { rank=same; "to digest" -> DIGEST } + { rank=same; "to archive" -> ARCHIVE } + { rank=same; "to outgoing" -> OUT } } @@ -79,16 +85,8 @@ acted on. Rules include things like "if the message's sender is a non-member, hold it for moderation", or "if the message contains an Approved field with a valid password, distribute it". A rule may also make no decision, in which case the message pickle is passed on to the -next rule in the filter chain. - -.. image:: chains.png - :scale: 67 - -.. builtin chain [shape=none] - accept chain [shape=none] - hold chain [shape=none] - discard chain [shape=none] - moderation chain [shape=none] +next rule in the filter chain. The default set of rules looks +something like this: .. graphviz:: @@ -119,21 +117,23 @@ next rule in the filter chain. subgraph queues { rankdir=TB rank=same - node [shape=box, color=lightblue, style=filled]; - POSTING; - DISCARD; - MODERATION; + node [shape=box, style=filled]; + POSTING [color=cyan]; + POSTING2 [label=POSTING, color=cyan]; + DISCARD [color=black, style=rounded]; + MODERATION [color=wheat]; + HOLD [color=wheat]; } IN -> approved:f0 approved:f2 -> POSTING - /* loop:f2 -> DISCARD */ + loop:f2 -> DISCARD modmember:f2 -> MODERATION - emergency:f2:e -> MODERATION [weight=0] - maxsize:f2 -> MODERATION [weight=0] - any:f2 -> MODERATION [weight=0] - truth:f1 -> POSTING [weight=0] + emergency:f2:e -> HOLD + maxsize:f2 -> MODERATION + any:f2 -> MODERATION + truth:f1 -> POSTING2 } -- cgit v1.2.3-70-g09d2 From 636ac483cfeb7f0f4fd95d797f2d1d304078aad1 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Thu, 15 Mar 2012 15:01:40 -0700 Subject: Remove redundant PNGs. --- src/mailman/docs/chains.png | Bin 94396 -> 0 bytes src/mailman/docs/msg-flow.png | Bin 37383 -> 0 bytes src/mailman/docs/pipeline.png | Bin 56391 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/mailman/docs/chains.png delete mode 100644 src/mailman/docs/msg-flow.png delete mode 100644 src/mailman/docs/pipeline.png (limited to 'src') diff --git a/src/mailman/docs/chains.png b/src/mailman/docs/chains.png deleted file mode 100644 index 570cc4597..000000000 Binary files a/src/mailman/docs/chains.png and /dev/null differ diff --git a/src/mailman/docs/msg-flow.png b/src/mailman/docs/msg-flow.png deleted file mode 100644 index 3affeee8a..000000000 Binary files a/src/mailman/docs/msg-flow.png and /dev/null differ diff --git a/src/mailman/docs/pipeline.png b/src/mailman/docs/pipeline.png deleted file mode 100644 index 0e5c9d984..000000000 Binary files a/src/mailman/docs/pipeline.png and /dev/null differ -- cgit v1.2.3-70-g09d2 From 3dc3f7b1a067ccb67a9d532bc14eeb9d0a0f0d63 Mon Sep 17 00:00:00 2001 From: Stephen J. Turnbull Date: Thu, 15 Mar 2012 15:26:24 -0700 Subject: Use minlen to disentagle the POSTING queue. --- src/mailman/docs/8-miles-high.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mailman/docs/8-miles-high.rst b/src/mailman/docs/8-miles-high.rst index 3cd97d9eb..0869bd563 100644 --- a/src/mailman/docs/8-miles-high.rst +++ b/src/mailman/docs/8-miles-high.rst @@ -118,22 +118,21 @@ something like this: rankdir=TB rank=same node [shape=box, style=filled]; - POSTING [color=cyan]; - POSTING2 [label=POSTING, color=cyan]; - DISCARD [color=black, style=rounded]; + DISCARD [shape=invhouse, color=black, style=solid]; MODERATION [color=wheat]; HOLD [color=wheat]; } + { POSTING [shape=box, style=filled, color=cyan]; } IN -> approved:f0 - approved:f2 -> POSTING + approved:f2 -> POSTING [minlen=2] loop:f2 -> DISCARD modmember:f2 -> MODERATION emergency:f2:e -> HOLD maxsize:f2 -> MODERATION any:f2 -> MODERATION - truth:f1 -> POSTING2 + truth:f1 -> POSTING [minlen=2] } -- cgit v1.2.3-70-g09d2