summaryrefslogtreecommitdiff
path: root/src/mailman/plugins/testing/example/rules/rules.py
diff options
context:
space:
mode:
authorBarry Warsaw2017-08-29 14:07:55 +0000
committerBarry Warsaw2017-08-29 14:07:55 +0000
commitde8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c (patch)
tree6fd2038427fbb36d8173fe338d277351cd19727b /src/mailman/plugins/testing/example/rules/rules.py
parentf847e15407bfbf824236547bdf728a1ae00bd405 (diff)
parentae0042a90220119414f61aeb20c6b58bfacb8af2 (diff)
downloadmailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.tar.gz
mailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.tar.zst
mailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.zip
Diffstat (limited to 'src/mailman/plugins/testing/example/rules/rules.py')
-rw-r--r--src/mailman/plugins/testing/example/rules/rules.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mailman/plugins/testing/example/rules/rules.py b/src/mailman/plugins/testing/example/rules/rules.py
new file mode 100644
index 000000000..7e9ba6ce7
--- /dev/null
+++ b/src/mailman/plugins/testing/example/rules/rules.py
@@ -0,0 +1,14 @@
+from mailman.interfaces.rules import IRule
+from public import public
+from zope.interface import implementer
+
+
+@public
+@implementer(IRule)
+class ExampleRule:
+ name = 'example-rule'
+ description = 'An example rule.'
+ record = True
+
+ def check(self, mlist, msg, msgdata):
+ return 'example' in msgdata