summaryrefslogtreecommitdiff
path: root/src/mailman/core/pipelines.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-03-23 17:26:19 -0400
committerBarry Warsaw2012-03-23 17:26:19 -0400
commit1d9fdeb0e587352a3bc66a3263152614bb6085dd (patch)
tree9d3a82618532aa7024483ca560276a0996a39935 /src/mailman/core/pipelines.py
parentcc949e304047a65e99c6089fc417883f7c411300 (diff)
downloadmailman-1d9fdeb0e587352a3bc66a3263152614bb6085dd.tar.gz
mailman-1d9fdeb0e587352a3bc66a3263152614bb6085dd.tar.zst
mailman-1d9fdeb0e587352a3bc66a3263152614bb6085dd.zip
Diffstat (limited to 'src/mailman/core/pipelines.py')
-rw-r--r--src/mailman/core/pipelines.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/mailman/core/pipelines.py b/src/mailman/core/pipelines.py
index 5c0eb7f71..25bb68030 100644
--- a/src/mailman/core/pipelines.py
+++ b/src/mailman/core/pipelines.py
@@ -15,12 +15,16 @@
# You should have received a copy of the GNU General Public License along with
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
-"""Pipeline processor."""
+"""Built-in pipelines."""
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
__metaclass__ = type
__all__ = [
+ 'BasePipeline',
+ 'OwnerPipeline',
+ 'PostingPipeline',
+ 'VirginPipeline',
'initialize',
'process',
]
@@ -89,11 +93,24 @@ class BasePipeline:
yield handler
-class BuiltInPipeline(BasePipeline):
- """The built-in pipeline."""
+
+class OwnerPipeline(BasePipeline):
+ """The built-in owner pipeline."""
+
+ name = 'default-owner-pipeline'
+ description = _('The built-in owner pipeline.')
+
+ _default_handlers = (
+ 'owner-recipients',
+ 'to-outgoing',
+ )
+
+
+class PostingPipeline(BasePipeline):
+ """The built-in posting pipeline."""
name = 'default-posting-pipeline'
- description = _('The built-in pipeline.')
+ description = _('The built-in posting pipeline.')
_default_handlers = (
'mime-delete',
@@ -139,6 +156,6 @@ def initialize():
handler.name, handler_class))
config.handlers[handler.name] = handler
# Set up some pipelines.
- for pipeline_class in (BuiltInPipeline, VirginPipeline):
+ for pipeline_class in (OwnerPipeline, PostingPipeline, VirginPipeline):
pipeline = pipeline_class()
config.pipelines[pipeline.name] = pipeline