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

mailbox.BabylMailbox, missing headers #34252

Closed
anonymous mannequin opened this issue Mar 29, 2001 · 5 comments
Closed

mailbox.BabylMailbox, missing headers #34252

anonymous mannequin opened this issue Mar 29, 2001 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@anonymous
Copy link
Mannequin

anonymous mannequin commented Mar 29, 2001

BPO 412230
Nosy @freddrake, @warsaw
Files
  • doc-diff.txt
  • 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 = 'https://github.com/warsaw'
    closed_at = <Date 2001-04-11.20:13:01.000>
    created_at = <Date 2001-03-29.17:06:33.000>
    labels = ['docs']
    title = 'mailbox.BabylMailbox, missing headers'
    updated_at = <Date 2001-04-11.20:13:01.000>
    user = 'https://bugs.python.org/anonymous'

    bugs.python.org fields:

    activity = <Date 2001-04-11.20:13:01.000>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2001-03-29.17:06:33.000>
    creator = 'anonymous'
    dependencies = []
    files = ['34']
    hgrepos = []
    issue_num = 412230
    keywords = []
    message_count = 5.0
    messages = ['4114', '4115', '4116', '4117', '4118']
    nosy_count = 2.0
    nosy_names = ['fdrake', 'barry']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue412230'
    versions = []

    @nobody
    Copy link
    Mannequin

    nobody mannequin commented Mar 29, 2001

    I am playing around with mailbox.BabylMailbox to parse
    my RMAIL
    file. It seems like certain headers are only recognized
    some of the
    time. For instance, "Message-Id:" headers sometime
    appears, sometimes not.

    The following program:

    ------------------------------------------------------------------

    #!/usr/bin/env python
    import mailbox
    mb = mailbox.BabylMailbox(
    open("/home/students/kurlberg/ggg", "r"))
    t = mb.next()
    print t.headers
    print "\nThe message-id is:", t.getheader("Message-ID")

    produces:

    ------------------------------------------------------------------
    ['X-Sender: clancey@alpha.muga.com\012', 'Date: Wed, 28
    Feb 2001 11:41:43 -0500\012', 'To:
    faculty@muga.com\012', 'From: Kevin Clancey
    <clancey@muga.com>\012', 'Subject: Travel Funds\012',
    'Content-Type: text/plain; charset="us-ascii"\012',
    'Content-Length: 183\012']

    The message-id is: None
    ------------------------------------------------------------------

    The file ggg contains: (I replaced the real domain by
    muga.com to
    avoid spambots.)

    --------- ggg start:
    ---------------------------------------------
    BABYL OPTIONS: -- rmail --
    Version: 5
    Labels:
    Note: This is the header of an rmail file.
    Note: If you are seeing it in rmail,
    Note: it means the file has no messages in it.

    1,,
    Summary-line: 28-Feb clancey@muga.com [23]
    #Travel Funds
    X-Coding-System: nil
    Mail-from: From clancey@muga.com Wed Feb 28 11:50 EST
    2001
    Received: from clancey.muga.com (clancey
    [128.192.3.198])
    by alpha.muga.com (8.9.1/8.9.1) with SMTP id LAA28223
    for <faculty@muga.com>; Wed, 28 Feb 2001 11:48:43
    -0500 (EST)
    Message-Id:
    <3.0.6.32.20010228114143.00921510@alpha.muga.com>
    X-Sender: clancey@alpha.muga.com
    X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6
    (32)
    Date: Wed, 28 Feb 2001 11:41:43 -0500
    To: faculty@muga.com
    From: Kevin Clancey <clancey@muga.com>
    Subject: Travel Funds
    Mime-Version: 1.0
    Content-Type: text/plain; charset="us-ascii"
    Content-Length: 183

    *** EOOH ***
    X-Sender: clancey@alpha.muga.com
    Date: Wed, 28 Feb 2001 11:41:43 -0500
    To: faculty@muga.com
    From: Kevin Clancey <clancey@muga.com>
    Subject: Travel Funds
    Content-Type: text/plain; charset="us-ascii"
    Content-Length: 183

    Please try to submit any travel requests to the
    department for travel
    during this fiscal year by Friday, March 30, 2001. (FYI
    the fiscal
    year ends on June 30, 2001.) Thanks.
    -Kevin

    --------- End of ggg:
    -----------------------------------

    On the other hand, message-id is found in the following
    example:

    -------- mail where message-id is
    detected---------------

    0, unseen,,
    Summary-line: 4-Aug root@gauss.muga.com [18]
    #gauss.muga.com 08/04/00:17.01 system check
    *** EOOH ***
    X-Coding-System: undecided-unix
    Mail-from: From root Fri Aug 4 17:01:01 2000
    Return-Path: <root>
    Received: (from root@localhost)
    by gauss.muga.com (8.9.3/8.9.3) id RAA13973
    for root; Fri, 4 Aug 2000 17:01:01 -0400
    Date: Fri, 4 Aug 2000 17:01:01 -0400
    From: root <root@gauss.muga.com>
    Message-Id: <200008042101.RAA13973@gauss.muga.com>
    To: root@gauss.muga.com
    Subject: gauss.muga.com 08/04/00:17.01 system check

    Unusual System Events
    =-=-=-=-=-=-=-=-=-=-=
    Aug 4 16:12:55 gauss sshd[381]: log: Generating new
    768 bit RSA key.
    Aug 4 16:12:55 gauss sshd[381]: log: RSA key
    generation complete.

    -------- end of mail where message-id is detected
    ----------

    Is there a bug in mailbox/mailbox.BabylMailbox?

    P.S. The above program was run with python version
    1.6b1. However,
    there are similar problems with python 2.0.

    Sorry about the ugly line breaks.

    @anonymous anonymous mannequin closed this as completed Mar 29, 2001
    @anonymous anonymous mannequin assigned warsaw Mar 29, 2001
    @anonymous anonymous mannequin added the docs Documentation in the Doc dir label Mar 29, 2001
    @anonymous anonymous mannequin closed this as completed Mar 29, 2001
    @anonymous anonymous mannequin assigned warsaw Mar 29, 2001
    @anonymous anonymous mannequin added the docs Documentation in the Doc dir label Mar 29, 2001
    @warsaw
    Copy link
    Member

    warsaw commented Apr 11, 2001

    Logged In: YES
    user_id=12800

    Ignore this.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 11, 2001

    Logged In: YES
    user_id=12800

    What is actually happening is that the mailbox module is
    returning only the headers in the "visible" message, and in
    your examples, the Message-ID is only in the original
    headers.

    Babyl's a weird format in that for each message, you have
    all the original headers, which appear before the EOOH line,
    and then a subset of those headers, called the "visible"
    headers. This is all the headers that a Babyl compliant
    mail reader will show you.

    I think it's fine for mailbox to return a mail message
    containing only the visible headers. You'll have to custom
    parse a Babyl mailbox file to get at the original headers.

    Attached is a suggested change to the mailbox module's
    documentation to explain this. I'm bumping this bug report
    over to Fred because it's now a documentation issue, as I
    don't believe the mailbox.py module should be changed.

    @freddrake
    Copy link
    Member

    Logged In: YES
    user_id=3066

    Documentation patch is accepted; please check in.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 11, 2001

    Logged In: YES
    user_id=12800

    Patch checked in for libmailbox.tex 1.18

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants