Skip to content

imaplib should convert line endings to be rfc2822 complient #38332

Closed

Description

@anadelonbrin
BPO 723962
Nosy @mwhudson

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 2003-04-30.00:02:30.000>
created_at = <Date 2003-04-19.00:16:16.000>
labels = ['library']
title = 'imaplib should convert line endings to be rfc2822 complient'
updated_at = <Date 2003-04-30.00:02:30.000>
user = 'https://bugs.python.org/anadelonbrin'

bugs.python.org fields:

activity = <Date 2003-04-30.00:02:30.000>
actor = 'pierslauder'
assignee = 'pierslauder'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-04-19.00:16:16.000>
creator = 'anadelonbrin'
dependencies = []
files = []
hgrepos = []
issue_num = 723962
keywords = []
message_count = 6.0
messages = ['15515', '15516', '15517', '15518', '15519', '15520']
nosy_count = 4.0
nosy_names = ['mwh', 'anthonybaxter', 'pierslauder', 'anadelonbrin']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue723962'
versions = []

Activity

  1. anadelonbrin commented on Apr 19, 2003

    anadelonbrinmannequin
    MannequinAuthor

    When imaplib.append is called, it should convert line
    endings from whatever they are (\r, \n or \r\n) to the
    format required by rfc2822 (in turn, required by rfc1730),
    i.e. CRLF - \r\n.

    The email package generates mail with Python "internal"
    line endings (i.e. \n), and so if a message is flattened
    and then appended via imap improper line endings are
    sent.

    While some imap servers are ok with this, at least one
    (Communigate Pro) mangles the message (all the
    headers become part of the body).

    smtplib has an example of how to do this.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Apr 19, 2003
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Apr 19, 2003
  4. anthonybaxter commented on Apr 19, 2003

    anthonybaxtermannequin
    Mannequin

    Logged In: YES
    user_id=29957

    You may want to contact imaplib's author, (Piers Lauder
    <[email protected]>)
    directly about this.

  5. mwhudson commented on Apr 19, 2003

    @mwhudson

    Logged In: YES
    user_id=6656

    Or just assign it to him :-)

  6. pierslauder commented on Apr 29, 2003

    pierslaudermannequin
    Mannequin

    Logged In: YES
    user_id=196212

    This is a bug. Can't think how it's managed to survive for
    so long (there must be a lot of forgiving imap servers out
    there). Anyway,
    I've just checked in a fix (based on the smtplib code -
    thanks for
    the ref.)

    And thanks for the bug report.

  7. anadelonbrin commented on Apr 29, 2003

    anadelonbrinmannequin
    MannequinAuthor

    Logged In: YES
    user_id=552329

    By the way, since posting this there was some discussion
    about the re used in smtplib. Tim Peters, Tim Stone and
    Skip Montareo eventually agreed (more or less) that
    CRLF_RE = re.compile(r'\r\n|\r|\n')
    was better than the one in smtplib. (I really ought to suggest
    that to whoever maintains smtplib as well...)

    But anyway, thanks for fixing it. I must say that the imap
    servers I have access to are forgiving enough - but it only
    takes one...

  8. pierslauder commented on Apr 30, 2003

    pierslaudermannequin
    Mannequin

    Logged In: YES
    user_id=196212

    Couldn't agree more :-) Now uses the much simpler regex.
    I'm also going to mark this bug as 'fixed"

  9. transferred this issue fromon Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions