diff options
| author | Barry Warsaw | 2012-03-23 19:25:27 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-03-23 19:25:27 -0400 |
| commit | 25a392bf5c1a8d4d2bc63d51697350fc7dbd48bc (patch) | |
| tree | f51fe7931545e23058cdb65595c7caed9b43bb0e /src/mailman/core/pipelines.py | |
| parent | aa2d0ad067adfd2515ed3c256cd0bca296058479 (diff) | |
| parent | e005e1b12fa0bd82d2e126df476b5505b440ce36 (diff) | |
| download | mailman-25a392bf5c1a8d4d2bc63d51697350fc7dbd48bc.tar.gz mailman-25a392bf5c1a8d4d2bc63d51697350fc7dbd48bc.tar.zst mailman-25a392bf5c1a8d4d2bc63d51697350fc7dbd48bc.zip | |
Merge the 'owners' branch. Posting to a list's -owner address now works as
expected.
Diffstat (limited to 'src/mailman/core/pipelines.py')
| -rw-r--r-- | src/mailman/core/pipelines.py | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/mailman/core/pipelines.py b/src/mailman/core/pipelines.py index d5cee588b..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,16 +93,29 @@ 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', 'tagger', - 'calculate-recipients', + 'member-recipients', 'avoid-duplicates', 'cleanse', 'cleanse-dkim', @@ -131,7 +148,7 @@ class VirginPipeline(BasePipeline): def initialize(): """Initialize the pipelines.""" # Find all handlers in the registered plugins. - for handler_class in find_components('mailman.pipeline', IHandler): + for handler_class in find_components('mailman.handlers', IHandler): handler = handler_class() verifyObject(IHandler, handler) assert handler.name not in config.handlers, ( @@ -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 |
