summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/mailinglist.py
diff options
context:
space:
mode:
authorMark Sapiro2016-10-31 18:07:21 -0700
committerMark Sapiro2016-10-31 18:07:21 -0700
commitf8a730624563b7f0b0c0a3c49467210a83c4f76a (patch)
tree734a4a37625e13542c7212ed22cc362b52ff32b7 /src/mailman/interfaces/mailinglist.py
parentd2418de626e51f76cf33c6d93b80e7968c356c97 (diff)
downloadmailman-f8a730624563b7f0b0c0a3c49467210a83c4f76a.tar.gz
mailman-f8a730624563b7f0b0c0a3c49467210a83c4f76a.tar.zst
mailman-f8a730624563b7f0b0c0a3c49467210a83c4f76a.zip
Diffstat (limited to 'src/mailman/interfaces/mailinglist.py')
-rw-r--r--src/mailman/interfaces/mailinglist.py64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py
index 877016f41..08b1f4032 100644
--- a/src/mailman/interfaces/mailinglist.py
+++ b/src/mailman/interfaces/mailinglist.py
@@ -24,6 +24,37 @@ from zope.interface import Attribute, Interface
@public
+class DMARCModerationAction(Enum):
+ none = 0
+ # No DMARC mitigations.
+ munge_from = 1
+ # Messages From: domains with DMARC policy will have From: replaced by
+ # the list posting address and the original From: added to Reply-To:
+ # or Cc:.
+ wrap_message = 2
+ # Messages From: domains with DMARC policy will be wrapped in an outer
+ # message From: the list posting address.
+ reject = 3
+ # Messages From: domains with DMARC policy will be rejected.
+ discard = 4
+ # Messages From: domains with DMARC policy will be discarded.
+
+
+@public
+class FromIsList(Enum):
+ none = 0
+ # No DMARC transformations will be applied to all messages.
+ munge_from = 1
+ # All messages will have From: replaced by the list posting address and
+ # the original From: added to Reply-To: except DMARCModerationAction
+ # wrap_message, reject or discard takes precedence if applicable.
+ wrap_message = 2
+ # All messages will be wrapped in an outer message From: the list posting
+ # address except DMARCModerationAction reject or discard takes
+ # precedence if applicable.
+
+
+@public
class Personalization(Enum):
none = 0
# Everyone gets a unique copy of the message, and there are a few more
@@ -216,6 +247,39 @@ class IMailingList(Interface):
def confirm_address(cookie=''):
"""The address used for various forms of email confirmation."""
+ # DMARC attributes.
+
+ dmarc_moderation_action = Attribute(
+ """The DMARCModerationAction to be applied to messages From: a
+ domain publishing DMARC p=reject and possibly quarantine or none.
+ """)
+
+ dmarc_quarantine_moderation_action = Attribute(
+ """Flag to apply DMARCModerationAction to messages From: a domain
+ publishing DMARC p=quarantine.
+ """)
+
+ dmarc_none_moderation_action = Attribute(
+ """Flag to apply DMARCModerationAction to messages From: a domain
+ publishing DMARC p=none, but only when
+ dmarc_quarantine_moderation_action is also true.
+ """)
+ dmarc_moderation_notice = Attribute(
+ """Text to include in any rejection notice to be sent when
+ DMARCModerationAction of reject applies.
+ """)
+
+ dmarc_wrapped_message_text = Attribute(
+ """Text to be added as a separate text/plain MIME part preceding the
+ original message part in the wrapped message when
+ DMARCModerationAction of wrap_message applies.
+ """)
+
+ from_is_list = Attribute(
+ """The FromIsList action to be applied to all messages for which
+ DMARCModerationAction is none or not applicable.
+ """)
+
# Rosters and subscriptions.
owners = Attribute(