Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email.generator.Generator doesn't mangle "From " lines in MIME preamble #59437

Closed
ChrisPickett mannequin opened this issue Jul 1, 2012 · 7 comments
Closed

email.generator.Generator doesn't mangle "From " lines in MIME preamble #59437

ChrisPickett mannequin opened this issue Jul 1, 2012 · 7 comments
Labels
stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error

Comments

@ChrisPickett
Copy link
Mannequin

ChrisPickett mannequin commented Jul 1, 2012

BPO 15232
Nosy @warsaw, @bitdancer, @akheron
Files
  • maildir_bug.tar.gz
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-07-23.01:56:22.563>
    created_at = <Date 2012-07-01.05:02:24.753>
    labels = ['type-bug', 'library', 'expert-email']
    title = 'email.generator.Generator doesn\'t mangle "From " lines in MIME preamble'
    updated_at = <Date 2012-07-30.05:23:48.694>
    user = 'https://bugs.python.org/ChrisPickett'

    bugs.python.org fields:

    activity = <Date 2012-07-30.05:23:48.694>
    actor = 'Chris.Pickett'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-07-23.01:56:22.563>
    closer = 'r.david.murray'
    components = ['Library (Lib)', 'email']
    creation = <Date 2012-07-01.05:02:24.753>
    creator = 'Chris.Pickett'
    dependencies = []
    files = ['26221']
    hgrepos = []
    issue_num = 15232
    keywords = []
    message_count = 7.0
    messages = ['164450', '164493', '166195', '166196', '166262', '166319', '166857']
    nosy_count = 5.0
    nosy_names = ['barry', 'r.david.murray', 'python-dev', 'petri.lehtinen', 'Chris.Pickett']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15232'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @ChrisPickett
    Copy link
    Mannequin Author

    ChrisPickett mannequin commented Jul 1, 2012

    tar xvfz maildir_bug.tar.gz
    cd maildir_bug
    ./bug.sh

    The attachment contains a maildir with a single message. This message has two body lines beginning with 'From '. When converted to mbox using the maildir2mbox.py, only the second line gets a '>' at the beginning. Thunderbird subsequently splits the message in two. I think the fix is to put a '>' in front of each 'From ' line and not just the second one. However, when I did that, Thunderbird displayed the '>', so either it is not the right fix, or Thunderbird has a bug.

    I am using Python 2.7.1. I searched the bug tracker and didn't see this issue, so decided to file even though I don't have the latest version.

    Chris

    @akheron
    Copy link
    Member

    akheron commented Jul 1, 2012

    Hi and thanks for the report. It seems that this is a bug in email.generator.Generator, as it fails to mangle "From " lines in the MIME preamble (after the headers, before the first "--Boundary..." line).

    @akheron akheron added the stdlib Python modules in the Lib dir label Jul 1, 2012
    @akheron akheron changed the title maildir parsing can split up messages with 'From ' at the start of a line email.generator.Generator doesn't mangle "From " lines in MIME preamble Jul 1, 2012
    @akheron akheron added the type-bug An unexpected behavior, bug, or error label Jul 1, 2012
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 23, 2012

    New changeset b97f65f2298d by R David Murray in branch '3.2':
    bpo-15232: correctly mangle From lines in MIME preamble and epilogue
    http://hg.python.org/cpython/rev/b97f65f2298d

    New changeset 80b81658455b by R David Murray in branch 'default':
    Merge bpo-15232: correctly mangle From lines in MIME preamble and epilogue
    http://hg.python.org/cpython/rev/80b81658455b

    New changeset 9f500171c592 by R David Murray in branch '2.7':
    bpo-15232: correctly mangle From lines in MIME preamble and epilogue
    http://hg.python.org/cpython/rev/9f500171c592

    @bitdancer
    Copy link
    Member

    Same problem with the epilogue. Fixed both.

    @akheron
    Copy link
    Member

    akheron commented Jul 24, 2012

    Thanks. The news entry should probably say 'From ' instead of 'From'.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 24, 2012

    New changeset 0caff799e4bf by R David Murray in branch '3.2':
    bpo-15232: make NEWS entry more accurate.
    http://hg.python.org/cpython/rev/0caff799e4bf

    New changeset d53524c43d0e by R David Murray in branch 'default':
    bpo-15232: make NEWS entry more accurate.
    http://hg.python.org/cpython/rev/d53524c43d0e

    New changeset e9ffde2c7da3 by R David Murray in branch '2.7':
    bpo-15232: make NEWS entry more accurate.
    http://hg.python.org/cpython/rev/e9ffde2c7da3

    @ChrisPickett
    Copy link
    Mannequin Author

    ChrisPickett mannequin commented Jul 30, 2012

    Thanks everyone!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants