Roundup Tracker - Issues


Author yyz
Recipients ajaksu2, schlatterbeck, yyz
Date 2009-04-02.23:46:35
Message-id <>
In-reply-to <>
thus spake Daniel Diniz <>: 
> The change to multipart to allow attachments looks good to me too, but
> I'm not sure if it's the only/best way to do it (nothing against it,
> just lack of knowledge on my part).

Since the code appeared to me to want to attach the original message
to the new bounce message that already contained the error (created as
a MIMEText), then it seemed you either go Multipart and attach them,
or concatenate them as text.  The code appeared to support the first
option more strongly so I went with that.

> This bit below I don't understand:
>          else:
> -            body.write(
> -        part = MIMEText(
> -        part['Content-Disposition'] = 'attachment'
> -        for header in bounced_message.headers:
> -            part.write(header)
> +            part = MIMEText(
>          message.attach(part)
> Again, not that I know it's wrong, I just can't say it's correct because
> it's not obvious. I can't even understand it before the patch :/

I have to admit this is me guessing based on the subversion history of (thank you svn blame).

As it had been written it wouldn't work at all, but I found this
in svn -r1866:

        except IOError, message:
            body.write("*** couldn't include message body: %s ***"
                       % bounced_message)

Oh, darn it. You know what, I don't think this part of my patch is entirely correct.
It shouldn't crash, so in that way it's better than before, but it
doesn't preserve the original desired behavior, which I believe is to
send along the headers as well...

New patch attached. Sorry for all this churn.
File name Uploaded
roundupmailer.patch yyz, 2009-04-02.23:46:34
Date User Action Args
2009-04-02 23:46:36yyzsetrecipients: + yyz, schlatterbeck, ajaksu2
2009-04-02 23:46:36yyzlinkissue2550534 messages
2009-04-02 23:46:35yyzcreate