summaryrefslogtreecommitdiff
path: root/mailman/rules/docs/implicit-dest.txt
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-25 13:01:41 -0500
committerBarry Warsaw2009-01-25 13:01:41 -0500
commiteefd06f1b88b8ecbb23a9013cd223b72ca85c20d (patch)
tree72c947fe16fce0e07e996ee74020b26585d7e846 /mailman/rules/docs/implicit-dest.txt
parent07871212f74498abd56bef3919bf3e029eb8b930 (diff)
downloadmailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.gz
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.zst
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.zip
Diffstat (limited to 'mailman/rules/docs/implicit-dest.txt')
-rw-r--r--mailman/rules/docs/implicit-dest.txt75
1 files changed, 0 insertions, 75 deletions
diff --git a/mailman/rules/docs/implicit-dest.txt b/mailman/rules/docs/implicit-dest.txt
deleted file mode 100644
index e5c340dcd..000000000
--- a/mailman/rules/docs/implicit-dest.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Implicit destination
-====================
-
-The 'implicit-dest' rule matches when the mailing list's posting address is
-not explicitly mentioned in the set of message recipients.
-
- >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
- >>> rule = config.rules['implicit-dest']
- >>> print rule.name
- implicit-dest
-
-This rule matches messages that have implicit destination, meaning that the
-mailing list's posting address isn't included in the explicit recipients.
-
- >>> mlist.require_explicit_destination = True
- >>> mlist.acceptable_aliases = u''
- >>> msg = message_from_string("""\
- ... From: aperson@example.org
- ... Subject: An implicit message
- ...
- ... """)
- >>> rule.check(mlist, msg, {})
- True
-
-You can disable implicit destination checks for the mailing list.
-
- >>> mlist.require_explicit_destination = False
- >>> rule.check(mlist, msg, {})
- False
-
-Even with some recipients, if the posting address is not included, the rule
-will match.
-
- >>> mlist.require_explicit_destination = True
- >>> msg['To'] = 'myfriend@example.com'
- >>> rule.check(mlist, msg, {})
- True
-
-Add the posting address as a recipient and the rule will no longer match.
-
- >>> msg['Cc'] = '_xtest@example.com'
- >>> rule.check(mlist, msg, {})
- False
-
-Alternatively, if one of the acceptable aliases is in the recipients list,
-then the rule will not match.
-
- >>> del msg['cc']
- >>> rule.check(mlist, msg, {})
- True
- >>> mlist.acceptable_aliases = u'myfriend@example.com'
- >>> rule.check(mlist, msg, {})
- False
-
-A message gated from NNTP will obviously have an implicit destination. Such
-gated messages will not be held for implicit destination because it's assumed
-that Mailman pulled it from the appropriate news group.
-
- >>> rule.check(mlist, msg, dict(fromusenet=True))
- False
-
-
-Alias patterns
---------------
-
-It's also possible to specify an alias pattern, i.e. a regular expression to
-match against the recipients. For example, we can say that if there is a
-recipient in the example.net domain, then the rule does not match.
-
- >>> mlist.acceptable_aliases = u'^.*@example.net'
- >>> rule.check(mlist, msg, {})
- True
- >>> msg['To'] = 'you@example.net'
- >>> rule.check(mlist, msg, {})
- False