summaryrefslogtreecommitdiff
path: root/src/mailman/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/pipeline')
-rw-r--r--src/mailman/pipeline/calculate_recipients.py6
-rw-r--r--src/mailman/pipeline/decorate.py4
-rw-r--r--src/mailman/pipeline/docs/calc-recips.txt16
-rw-r--r--src/mailman/pipeline/docs/file-recips.txt27
-rw-r--r--src/mailman/pipeline/file_recipients.py2
5 files changed, 33 insertions, 22 deletions
diff --git a/src/mailman/pipeline/calculate_recipients.py b/src/mailman/pipeline/calculate_recipients.py
index 8ff799f85..3892b3085 100644
--- a/src/mailman/pipeline/calculate_recipients.py
+++ b/src/mailman/pipeline/calculate_recipients.py
@@ -91,12 +91,12 @@ delivery. The original message as received by Mailman is attached.
""")
raise errors.RejectMessage(Utils.wrap(text))
# Calculate the regular recipients of the message
- recipients = set(member.address.address
+ recipients = set(member.address.email
for member in mlist.regular_members.members
if member.delivery_status == DeliveryStatus.enabled)
# Remove the sender if they don't want to receive their own posts
- if not include_sender and member.address.address in recipients:
- recipients.remove(member.address.address)
+ if not include_sender and member.address.email in recipients:
+ recipients.remove(member.address.email)
# Handle topic classifications
do_topic_filters(mlist, msg, msgdata, recipients)
# Bookkeeping
diff --git a/src/mailman/pipeline/decorate.py b/src/mailman/pipeline/decorate.py
index 66ec83e90..4648b17f3 100644
--- a/src/mailman/pipeline/decorate.py
+++ b/src/mailman/pipeline/decorate.py
@@ -57,12 +57,12 @@ def process(mlist, msg, msgdata):
member = mlist.members.get_member(recipient)
d['user_address'] = recipient
if user is not None and member is not None:
- d['user_delivered_to'] = member.address.original_address
+ d['user_delivered_to'] = member.address.original_email
# BAW: Hmm, should we allow this?
d['user_password'] = user.password
d['user_language'] = member.preferred_language.description
d['user_name'] = (user.real_name if user.real_name
- else member.address.original_address)
+ else member.address.original_email)
d['user_optionsurl'] = member.options_url
# These strings are descriptive for the log file and shouldn't be i18n'd
d.update(msgdata.get('decoration-data', {}))
diff --git a/src/mailman/pipeline/docs/calc-recips.txt b/src/mailman/pipeline/docs/calc-recips.txt
index 27c2ba806..efa1bc9c7 100644
--- a/src/mailman/pipeline/docs/calc-recips.txt
+++ b/src/mailman/pipeline/docs/calc-recips.txt
@@ -59,8 +59,9 @@ but not all of the recipients.
>>> handler = config.handlers['calculate-recipients']
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- [u'qperson@example.com', u'zperson@example.com']
+ >>> dump_list(msgdata['recipients'])
+ qperson@example.com
+ zperson@example.com
Regular delivery recipients
@@ -71,8 +72,10 @@ soon as they are posted. In other words, these folks are not digest members.
>>> msgdata = {}
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com']
+ >>> dump_list(msgdata['recipients'])
+ aperson@example.com
+ bperson@example.com
+ cperson@example.com
Members can elect not to receive a list copy of their own postings.
@@ -84,8 +87,9 @@ Members can elect not to receive a list copy of their own postings.
... """)
>>> msgdata = {}
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- [u'aperson@example.com', u'bperson@example.com']
+ >>> dump_list(msgdata['recipients'])
+ aperson@example.com
+ bperson@example.com
Members can also elect not to receive a list copy of any message on which they
are explicitly named as a recipient. However, see the `avoid duplicates`_
diff --git a/src/mailman/pipeline/docs/file-recips.txt b/src/mailman/pipeline/docs/file-recips.txt
index c7eeb9ce8..c994f820e 100644
--- a/src/mailman/pipeline/docs/file-recips.txt
+++ b/src/mailman/pipeline/docs/file-recips.txt
@@ -30,8 +30,8 @@ returns.
<BLANKLINE>
A message.
<BLANKLINE>
- >>> msgdata
- {u'recipients': 7}
+ >>> dump_msgdata(msgdata)
+ recipients: 7
Missing file
@@ -50,8 +50,8 @@ empty.
No such file or directory: u'.../_xtest@example.com/members.txt'
>>> msgdata = {}
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- []
+ >>> dump_list(msgdata['recipients'])
+ *Empty*
Existing file
@@ -74,9 +74,13 @@ addresses are returned as the set of recipients.
>>> msgdata = {}
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- ['bperson@example.com', 'cperson@example.com', 'dperson@example.com',
- 'eperson@example.com', 'fperson@example.com', 'gperson@example.com']
+ >>> dump_list(msgdata['recipients'])
+ bperson@example.com
+ cperson@example.com
+ dperson@example.com
+ eperson@example.com
+ fperson@example.com
+ gperson@example.com
However, if the sender of the original message is a member of the list and
their address is in the include file, the sender's address is *not* included
@@ -99,6 +103,9 @@ in the recipients list.
... """)
>>> msgdata = {}
>>> handler.process(mlist, msg, msgdata)
- >>> sorted(msgdata['recipients'])
- ['bperson@example.com', 'dperson@example.com',
- 'eperson@example.com', 'fperson@example.com', 'gperson@example.com']
+ >>> dump_list(msgdata['recipients'])
+ bperson@example.com
+ dperson@example.com
+ eperson@example.com
+ fperson@example.com
+ gperson@example.com
diff --git a/src/mailman/pipeline/file_recipients.py b/src/mailman/pipeline/file_recipients.py
index bd163a283..f4cf7a4c6 100644
--- a/src/mailman/pipeline/file_recipients.py
+++ b/src/mailman/pipeline/file_recipients.py
@@ -61,5 +61,5 @@ class FileRecipients:
# recipients.
member = mlist.members.get_member(msg.sender)
if member is not None:
- addrs.discard(member.address.address)
+ addrs.discard(member.address.email)
msgdata['recipients'] = addrs