summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/mailinglist.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/interfaces/mailinglist.py')
-rw-r--r--src/mailman/interfaces/mailinglist.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py
index 359cd5069..44376a7b2 100644
--- a/src/mailman/interfaces/mailinglist.py
+++ b/src/mailman/interfaces/mailinglist.py
@@ -24,6 +24,25 @@ from zope.interface import Attribute, Interface
@public
+class DMARCMitigateAction(Enum):
+ # Mitigations to apply to messages From: domains publishing an applicable
+ # DMARC policy, or unconditionally depending on settings.
+ #
+ # No DMARC mitigations.
+ no_mitigation = 0
+ # 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:.
+ munge_from = 1
+ # Messages From: domains with DMARC policy will be wrapped in an outer
+ # message From: the list posting address.
+ wrap_message = 2
+ # Messages From: domains with DMARC policy will be rejected.
+ reject = 3
+ # Messages From: domains with DMARC policy will be discarded.
+ discard = 4
+
+
+@public
class Personalization(Enum):
none = 0
# Everyone gets a unique copy of the message, and there are a few more
@@ -216,6 +235,38 @@ class IMailingList(Interface):
def confirm_address(cookie=''):
"""The address used for various forms of email confirmation."""
+ # DMARC attributes.
+
+ dmarc_mitigate_action = Attribute(
+ """The mitigation to apply to messages from a DMARC matching domain.
+
+ This is a DMARCMitigateAction to be applied to messages From: a domain
+ publishing DMARC p=reject or quarantine, and possibly unconditionally
+ depending on the setting of dmarc_mitigate_unconditionally.
+ """)
+
+ dmarc_mitigate_unconditionally = Attribute(
+ """Should DMARC mitigations apply unconditionally?
+
+ A flag indicating whether to apply dmarc_mitigate_action to all
+ messages, but only if dmarc_mitigate_action is other than reject or
+ discard.
+ """)
+
+ dmarc_moderation_notice = Attribute(
+ """Text to include in any DMARC rejected message.
+
+ Rejection notices are sent when DMARCMitigateAction of reject applies.
+ """)
+
+ dmarc_wrapped_message_text = Attribute(
+ """Additional MIME text to include in DMARC wrapped messages.
+
+ This text is added as a separate text/plain MIME part preceding the
+ original message part in the wrapped message when DMARCMitigateAction
+ of wrap_message applies.
+ """)
+
# Rosters and subscriptions.
owners = Attribute(