Re: cc'd e-mail addresses rewritten with @invalid.domain
Hi Mark,
Thanks for the help with this! Other list members will also see the e-mail as coming from user@invalid.domain<mailto:user@invalid.domain>. I will continue testing the other scenarios and will reply back as soon as possible.
Thanks again for the help with this and have a nice day! Peter
On Mon, Sep 21, 2020 at 9:00 PM Mark Sapiro <mark@msapiro.net> wrote: On 9/21/20 10:49 AM, peterbw@gmail.com<mailto:peterbw@gmail.com> wrote:
Hi,
We've recently noticed an issue where users who are cc'd in a message where a mailing list is also within the cc list are getting rewritten a user@invalid.domain.
This issue looks like it may be related to Outlook and how user names are displayed specifically. Here is an example:
To: test_user@gmail.com<mailto:test_user@gmail.com> cc: listserv@lists.test.org<mailto:listserv@lists.test.org>; Williams, Peter;
"Williams, Peter" maps to a user e-mail in the Outlook Global Address book. When the message is sent the list will send the message with the first name and last name separated, for example the message will appear:
to: test_user@gmail.com<mailto:test_user@gmail.com> cc: listserv@lists.test.org<mailto:listserv@lists.test.org>, Williams@invalid.domain, Peter@invalid.domain
Because apparently Outlook is sending the message with the literal
Cc: listserv@lists.test.org<mailto:listserv@lists.test.org>; Williams, Peter;
instead of something like
Cc: listserv@lists.test.org<mailto:listserv@lists.test.org>, "Williams, Peter" <peters_real_address@example.com<mailto:peters_real_address@example.com>>
Then some MTA in the chain is seeing the unqualified addresses Williams and Peter and appending its own local domain.
This only seems to happen with users who are cc'd who are also members of the list that is being cc'd. For example in the scenario above my e-mail that is cc'd is also a member of listserv@lists.test.org<mailto:listserv@lists.test.org>.
In this case, where do you see this? i.e., do other list members see it in the message they receive from the list?
I don't know why that would be. I'm certain that Mailman is not involved in this and the Williams@invalid.domain and Peter@invalid.domain addresses are in the Cc: as received by Mailman.
This issue does not occur if the user e-mail address is listed before the mailing list in the cc field. So for example, if the cc in the scenario above contained Williams, Peter; listserv@lists.test.org<mailto:listserv@lists.test.org>; it would route properly.
Again, I think this is Outlook.
What's in the Cc: of the mail that test_user@gmail.com<mailto:test_user@gmail.com> receives directly?
What happens if you send mail in this way with
To: test_user@gmail.com<mailto:test_user@gmail.com> cc: other_user@gmail.com<mailto:other_user@gmail.com>; Williams, Peter;
Again, what's in the Cc: of the mail that test_user@gmail.com<mailto:test_user@gmail.com> and other_user@gmail.com<mailto:other_user@gmail.com> receive?
Also, please see <https://wiki.list.org/DOC/Mailman%20is%20not%20Listserv>.
-- Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org<mailto:mailman-users@mailman3.org> To unsubscribe send an email to mailman-users-leave@mailman3.org<mailto:mailman-users-leave@mailman3.org> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Hi Mailman Users,
I've done some more testing with this issue and have determined that this seems to be an issue with how commas within the display name in cc'd messages are being processed with messages sent from the Outlook client.
Here are some test scenarios. Note I set the mailing list I was testing with to hold messages in moderation. Once the message was held I copied the information from the headers directly from Postorius held message information into the space below:
Test Scenario 1: Display name in Outlook: Williamss, Peterr C Outcome: Does not work as intended. The CC address is formatted as Williamss@invalid.domain in messages received by mailing list members, oddly the "Peterr C" part of the display name is not present anywhere in the CC addresses received by mailing list members. Header information from held message in Postorius CC: "os-x-lion@lists.test.org" <os-x-lion@lists.test.org>, "Williamss, Peterr C" <peterbw@test.com>
Test Scenario 2: Display name in Outlook: Williams, Peter D Outcome: Does not work as intended. Interestingly, the CC address in the message received by mailing list members is formatted as two separate addresses in this case: Williams@invalid.domain and Peter@invalid.domain. "D" is not present anywhere. Could this issue be related to the number of characters? Header information from held message in Postorius: CC: "os-x-lion@lists.test.org" <os-x-lion@lists.test.org>, "Williams, Peter B" <peterbw@test.com>
Test Scenario 3: Display name in Outlook: Williamss Peterr C Outcome: Works properly. The CC address contains the correct address and display name information. The information in messages received from the mailing list contain the address formatted correctly as: "Williamss Peterr C peterbw@test.com" Header information from held message in Postorius: CC: "os-x-lion@lists.test.org" <os-x-lion@lists.test.org>, Williamss Peterr C <peterbw@test.com>
Hi Mailman Users,
I apologize for sending multiple messages! I wanted to mention that this issue occurs whether or not the user with the malformed cc is a member of the list in question. I also noticed that the issues seem to be only happening with the addresses in quotes, and wondered if this snippet of code in avoid_duplicates.py gives any hints as to what the issues may be?
# We've seen messages with Cc: headers folded inside a quoted string.
# I.e., a message composed with several Cc addresses of the form
# 'real name (dept) <user@example.com>', the MUA quotes
# "real name (dept)" and then folds the header between 'name' and
# '(dept)' resulting in a header including the entry
# '"real name\r\n (dept)" <user@example.com>' which parses incorrectly,
# so we "unfold" headers here.
for header in ('to', 'cc', 'resent-to', 'resent-cc'):
hdrs_unfolded = [re.sub('[\r\n]', '', value) for value in
msg.get_all(header, [])]
addrs = getaddresses(hdrs_unfolded)
header_addresses = dict((addr, formataddr((name, addr)))
for name, addr in addrs
if addr)
Thanks again and have a nice day! Peter
On 9/23/20 12:48 PM, pwilliam@fredhutch.org wrote:
Hi Mailman Users,
I've done some more testing with this issue and have determined that this seems to be an issue with how commas within the display name in cc'd messages are being processed with messages sent from the Outlook client.
Here are some test scenarios. Note I set the mailing list I was testing with to hold messages in moderation. Once the message was held I copied the information from the headers directly from Postorius held message information into the space below:
Test Scenario 1: Display name in Outlook: Williamss, Peterr C Outcome: Does not work as intended. The CC address is formatted as Williamss@invalid.domain in messages received by mailing list members, oddly the "Peterr C" part of the display name is not present anywhere in the CC addresses received by mailing list members. Header information from held message in Postorius CC: "os-x-lion@lists.test.org" <os-x-lion@lists.test.org>, "Williamss, Peterr C" <peterbw@test.com>
"Williamss, Peterr C" <peterbw@test.com>
is correct for how this address spec should be represented. If in fact, it is split into two lines "Williamss, Peterr C" <peterbw@test.com>
as it appears above, it looks to me as if the actual header should be
CC: "os-x-lion@lists.test.org" <os-x-lion@lists.test.org>, "Williamss, Peterr C" <peterbw@test.com>
but is being folded on the whitespace between Williamss and Peterr.
This is <https://gitlab.com/mailman/mailman/-/issues/725>, fixed at <https://gitlab.com/mailman/mailman/-/merge_requests/652>. The fix will be in the next (3.3.2) release of Mailman core.
This is really an Outlook issue. See <https://gitlab.com/mailman/mailman/-/issues/725#note_351314868> for why folding within a quoted string is allowed, but in cases like this SHOULD not be done.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
That helps a lot, thank you for the assistance with this!
participants (3)
-
Mark Sapiro
-
pwilliam@fredhutch.org
-
Williams, Peter B