Giter VIP home page Giter VIP logo

Comments (8)

jordan-wright avatar jordan-wright commented on July 27, 2024

Hey there!

Unfortunately, this is an issue I'm working on. This is likely because you having a blank line at the beginning?

If that's the case, try removing the blank line and giving it a shot again. I plan to strip that automatically soon.

On Oct 5, 2015, at 2:07 AM, Wael M. Nasreddine [email protected] wrote:

Email content:

From: "Keith Packard" [email protected]
To: [email protected]
Date: Tue, 17 Nov 2009 18:03:17 -0800
Subject: [notmuch] Introducing myself
In-Reply-To: 20091118002059.067214ed@hikari
References: 20091118002059.067214ed@hikari
Message-ID: [email protected]

On Wed, 18 Nov 2009 00:20:59 +0100, Adrian Perez de Castro wrote:

Some time ago I thought
about doing something like Not Much and in fact I played a bit with the
Python+Xapian and the Python+Whoosh combinations, because I find relaxing
to code things in Python when I am not working and also it is installed
by default on most distribution. I got to have some mailboxes indexed and
basic searching working a couple of months ago.

Sup certainly started a lot of people thinking...

Also, I would like to share one idea I had in mind, that you might find
interesting: One thing I have found very annoying is having to re-tag my
mail when the indexes get b0rked (it happened a couple of times to me while
using Sup), so I was planning to mails as read/unread and adding the tags
not just to the index, but to the mail text itself, e.g. by adding a
"X-Tags" header field or by reusing the "Keywords" one.

Easier than that, notmuch (and sup too), provide a 'dump' command which
just lists all of the message IDs and their associated tags. Makes
saving tags easy and doesn't involve rewriting messages. I do this once
a day just before my computer is backed up to an external drive.

If the index is destroyed, you can reindex the messages and then reapply
all of the tags with 'notmuch restore'.

keith.packard at intel.com
Getting the error mime: no media type when I try to parse the email above. Found that developing Gmuch email_bug branch.


Reply to this email directly or view it on GitHub.

from email.

kalbasit avatar kalbasit commented on July 27, 2024

Hey Jordan,

I don't have a new line at the beginning, this seems to be from a different issue.

screen shot 2015-10-05 at 09 19 52

I added a failure test in kalbasit/email@e614fb5

from email.

jordan-wright avatar jordan-wright commented on July 27, 2024

Thanks for that failure case! That helps quite a bit. I believe that there are two possible causes:

  1. No "MIME-Version: 1.0" header - I don't know if this is mandatory, but I'll check the RFC.
  2. No "Content-Type" header. This should default to "text/plain; charset=us-ascii" but I'll need to make sure this is happening.

Let me look into this and I'll get back to you asap.

from email.

kalbasit avatar kalbasit commented on July 27, 2024

perfect, thanks Jordan.

from email.

jordan-wright avatar jordan-wright commented on July 27, 2024

Ok, I've found a few issues that need to get resolved.

The root cause is that there is no Content-Type header. This should default to "text/plain; charset=us-ascii", but it looks like the logic to handle that is not in the stdlib (from what I can tell).

So, when parsing the media type disposition, we get the error since there is no "Content-Type" in the map of headers.

That's number one. The second issue is that my parsing logic currently assumes that the email will be a multipart email. So, even if you add the Content-Type, the body won't be parsed.

I need to add the logic to handle non-multipart emails, so I'll probably make another issue for it. All in all, I'll probably setup two new issues for these, and keep this one open in the meantime until both are resolved.

I'll knock this out as soon as I can, but it might be a week or so due to time constraints.

from email.

kalbasit avatar kalbasit commented on July 27, 2024

That works for me, thanks Jordan.

from email.

jordan-wright avatar jordan-wright commented on July 27, 2024

Ok, @kalbasit, I think I fixed the issue with 48c3347. Would you mind confirming?

If we're good to go, I'll close out this issue.

from email.

kalbasit avatar kalbasit commented on July 27, 2024

This is fixed, I have another issue though, so I'll open a separate issue for it

from email.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.