FAQ

Josh Clark wrote:
Also, I should have noted in my original messge that this installation
was recently moved from another server, and I believe that my failed
attempt is actually the first message that's being sent to the list
through the new setup (it's used as a broadcast newsletter list, not
as a discussion list).

In case this is relevant, the original server was running a previous
version of 2.1.x (not sure which version precisely, sorry). I
installed 2.1.11 on the new server and then copied the contents of
lists and archives/private from the old to the new, running "bin/
check_perms -f" afterward.

Thanks again for helping to troubleshoot this issue, it's much
appreciated.

Try applying the attached Decorate.patch.txt patch to
Mailman/Handlers/Decorate.py and restart mailman.

Then try the post and report what you find in Mailman's 'debug' log.

--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Decorate.patch.txt
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20081027/8750ac6b/attachment.txt>

Search Discussions

  • Josh Clark at Oct 28, 2008 at 10:24 am

    Try applying the attached Decorate.patch.txt patch to
    Mailman/Handlers/Decorate.py and restart mailman.

    Then try the post and report what you find in Mailman's 'debug' log.
    Thanks again, Mark. Here's what shows up in the debug log (email
    address anonymized to protect the innocent; it was an unremarkable
    yahoo.com account).

    $ cat debug
    Oct 28 05:14:39 2008 (22325) msg_footer type: <type 'str'>
    footer type: <type 'unicode'>
    footer: _______________________________________________
    You are subscribed to this mailing list as address at example.com
    To edit your subscription options or to unsubscribe, visit:
    http://mailman.example.com/mailman/options/moxiemail/address%40example.com

    lcset: us-ascii

    All best,
    Josh
  • Mark Sapiro at Oct 28, 2008 at 4:08 pm

    Josh Clark wrote:

    Try applying the attached Decorate.patch.txt patch to
    Mailman/Handlers/Decorate.py and restart mailman.

    Then try the post and report what you find in Mailman's 'debug' log.
    Thanks again, Mark. Here's what shows up in the debug log (email
    address anonymized to protect the innocent; it was an unremarkable
    yahoo.com account).

    $ cat debug
    Oct 28 05:14:39 2008 (22325) msg_footer type: <type 'str'>
    footer type: <type 'unicode'>
    footer: _______________________________________________
    You are subscribed to this mailing list as address at example.com
    To edit your subscription options or to unsubscribe, visit:
    http://mailman.example.com/mailman/options/moxiemail/address%40example.com

    lcset: us-ascii

    That narrows it down a bit. What is happening is one of the strings
    being interpolated into the footer is unicode. The footer is

    msg_footer = """_______________________________________________
    You are subscribed to this mailing list as %(user_address)s
    To edit your subscription options or to unsubscribe, visit:
    %(user_optionsurl)s"""

    and somehow this 'address at example.com' is unicode rather than a string.

    Try the following:

    Remove the patch from Decorate.py as it isn't needed any more. Then do

    $ bin/withlist moxiemail
    Loading list moxiemail (unlocked)
    The variable `m' is the moxiemail MailList instance
    for mem in m.getMembers():
    ... print repr(m.getMemberCPAddress(mem))
    ...

    The first line above represents a prompt and a withlist command. The
    next lines are output from withlist ending with a '>>> ' python
    prompt. You type what follows the prompt and get a '... ' prompt
    because the 'for' is incomplete. You type the next line indented, and
    then just <CR> to the next prompt. This should be followed by a list of

    'address at example.com' and/or u'address at example.com' like addresses
    ending with a '>>> ' prompt. Type control-D at this prompt to quit.

    I'm interested in how many of these addresses are u'...', and how they
    got to be that way. The above will answer the first question.

    The attached patch to Decorate.py (applied after removing the other
    one) will work around the problem, but the real question is how the
    'case preserved' addresses got to be unicode in the first place.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

    -------------- next part --------------
    An embedded and charset-unspecified text was scrubbed...
    Name: decorate.patch.txt
    URL: <http://mail.python.org/pipermail/mailman-users/attachments/20081028/76521ff4/attachment-0001.txt>
  • Josh Clark at Oct 28, 2008 at 7:46 pm
    Thanks again, Mark, this is all *very* appreciated.
    I'm interested in how many of these addresses are u'...', and how
    they got to be that way.

    Of the 1639 e-mail addresses, 349 are u'...' I don't have any great
    ideas about what might be out of the ordinary about my installation.
    I've never made any mods to the Mailman scripts. I *have* used custom
    html templates (charset=utf-8), but I don't think that this would
    affect the character encoding on the server side, would it? If you'd
    like to take a look:
    <http://mailman.globalmoxie.com/mailman/listinfo/moxiemail>

    However, the majority of subscriptions come via a script that I set up
    to send subscribe commands via email to the list. It accepts an email
    address in a web form and sends it along as a subscribe command to
    moxiemail-requests. Here's a sample (with domains changed to
    example.com):

    ------
    Return-Path: <support at example.com>
    X-Original-To: moxiemail-request at example.com
    Delivered-To: moxiemail-request at example.com
    Received: by houdini.example.com (Postfix, from userid 536)
    id 26E3A312869A; Tue, 28 Oct 2008 14:38:07 -0500 (CDT)
    From: support at example.com
    To: moxiemail-request at example.com
    Subject: subscribe address=test at example.com
    Mime-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=US-ASCII; format=flowed
    Message-Id: <20081028193807.26E3A312869A at houdini.example.com>
    Date: Tue, 28 Oct 2008 14:38:07 -0500 (CDT)

    subscribe address=test at example.com
    ------

    I'm happy to do any tests or troubleshooting that might be helpful to
    get at the root problem.
    The attached patch to Decorate.py (applied after removing the other
    one) will work around the problem.
    Excellent, thanks! A quick question before I try it: I've now tried to
    send this message a few times; is it possible that these attempts were
    successfully mailed to some portion of the list (e.g., some of the non-
    unicode addresses)? If it's an indicator, the last address that showed
    up with the "bin/withlist" commands that you suggested was also the
    same address that showed up in the message footer for the debug patch
    that you originally sent (and, I presume, the address that caused the
    error).

    (If it's likely that some significant number of people have gotten
    several copies of the message, I just want to add an apology for the
    repeats before mailing it again. Either way, I'll give the patch a
    spin in the next 24 hours.)

    Thanks again for all of the speedy, detailed help with this.

    All best,
    Josh
  • Mark Sapiro at Oct 28, 2008 at 8:28 pm

    Josh Clark wrote:
    Thanks again, Mark, this is all *very* appreciated.
    I'm interested in how many of these addresses are u'...', and how
    they got to be that way.

    Of the 1639 e-mail addresses, 349 are u'...' I don't have any great
    ideas about what might be out of the ordinary about my installation.

    Ist it the case that the u'...' ones all have at least one upper case
    character in the local part and the rest don't?

    I've never made any mods to the Mailman scripts. I *have* used custom
    html templates (charset=utf-8), but I don't think that this would
    affect the character encoding on the server side, would it?

    This is not an encoding issue. It's complicated, but unicode is an
    abstract representation of characters. Unicode entities are encoded
    into strings of characters (or bytes in the case of some encodings
    that represent a character as multiple bytes) using some character
    encoding like us-ascii or utf-8 or iso-8859-1, etc., and strings can
    be decoded into unicode.

    The issue here is not one of the character encoding of the email
    address. It's that some of the email addresses (or at least the 'case
    preserved' addresses) are stored as unicode objects instead of strings.

    If you'd
    like to take a look:
    <http://mailman.globalmoxie.com/mailman/listinfo/moxiemail>

    However, the majority of subscriptions come via a script that I set up
    to send subscribe commands via email to the list. It accepts an email
    address in a web form and sends it along as a subscribe command to
    moxiemail-requests. Here's a sample (with domains changed to
    example.com):

    ------
    Return-Path: <support at example.com>
    X-Original-To: moxiemail-request at example.com
    Delivered-To: moxiemail-request at example.com
    Received: by houdini.example.com (Postfix, from userid 536)
    id 26E3A312869A; Tue, 28 Oct 2008 14:38:07 -0500 (CDT)
    From: support at example.com
    To: moxiemail-request at example.com
    Subject: subscribe address=test at example.com
    Mime-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=US-ASCII; format=flowed
    Message-Id: <20081028193807.26E3A312869A at houdini.example.com>
    Date: Tue, 28 Oct 2008 14:38:07 -0500 (CDT)

    subscribe address=test at example.com
    ------

    I'm happy to do any tests or troubleshooting that might be helpful to
    get at the root problem.

    Thanks. I'll try to think of what to do. One thing, if you trust me to
    respect the confidentiality of your list membership, you can send me
    off-list a copy of lists/moxiemail/config.pck.

    The attached patch to Decorate.py (applied after removing the other
    one) will work around the problem.
    Excellent, thanks! A quick question before I try it: I've now tried to
    send this message a few times; is it possible that these attempts were
    successfully mailed to some portion of the list (e.g., some of the non-
    unicode addresses)? If it's an indicator, the last address that showed
    up with the "bin/withlist" commands that you suggested was also the
    same address that showed up in the message footer for the debug patch
    that you originally sent (and, I presume, the address that caused the
    error).

    (If it's likely that some significant number of people have gotten
    several copies of the message, I just want to add an apology for the
    repeats before mailing it again. Either way, I'll give the patch a
    spin in the next 24 hours.)

    When we had the debug patch, there appeared to be only one entry in the
    debug log. If that mail had been successfully delivered, the address
    that caused the failure would have been preceeded by debug log entries
    for the successful ones.

    In any case, each failure resulted in a .pck file in the shunt queue.
    Those files should still be there. If you dump them with bin/dumpdb,
    you will see the message as the first object in the file and the
    metadata as the second object. The metadata should contain an
    'undelivered' list containing all those who didn't get that message.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Josh Clark at Oct 29, 2008 at 9:56 am
    Many thanks for the patch, Mark, your patch did indeed allow the
    message to go through.
    Ist it the case that the u'...' ones all have at least one upper case
    character in the local part and the rest don't?
    No, none of the u'...' addresses have uppercase characters. The only
    messages with uppercase characters are those without the u'...' format.

    Thanks again!
    Josh

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedOct 27, '08 at 10:10p
activeOct 29, '08 at 9:56a
posts6
users2
websitelist.org

2 users in discussion

Mark Sapiro: 3 posts Josh Clark: 3 posts

People

Translate

site design / logo © 2022 Grokbase