GithubHelp home page GithubHelp logo

Bad quote_re about imap2maildir HOT 4 CLOSED

viric avatar viric commented on September 26, 2024
Bad quote_re

from imap2maildir.

Comments (4)

rtucker avatar rtucker commented on September 26, 2024

I added a test to testsuite.py, based on sending myself an e-mail with a Subject of:

test message "blablabla\\" test message

However, it works OK with the quoted_re as it is, so I don't necessarily think I'm testing it right. Assuming the message is in your inbox (and you're using gmail :-), and you know which message it is, can you try:

import simpleimap
imap = simpleimap.SimpleImapSSL('imap.gmail.com')
imap.login('[email protected]', 'yourpassword')
imap.select('INBOX')
# returns ('OK', ['29']), where 29 is the message count
imap.fetch('29', '(ENVELOPE)')
# assuming the 29th message; otherwise, trial and error

This will return something like:

('OK', ['29 (ENVELOPE ("Tue, 23 Nov 2010 12:29:01 -0500" "test message \\"blablabla\\\\\\\\\\" test message" (("Ryan Tucker" NIL "rtucker" "arrogant-bastard.hoopycat.com")) (("Ryan Tucker" NIL "rtucker" "arrogant-bastard.hoopycat.com")) (("Ryan Tucker" NIL "rtucker" "arrogant-bastard.hoopycat.com")) ((NIL NIL "rtucker" "gmail.com")) NIL NIL NIL "<[email protected]>"))'])

Feel free to anonymize e-mail addresses and such. I'm mostly interested in the subject part of it. (Also, your guess about the last '?' is as good as mine at this point. It's been awhile!)

from imap2maildir.

viric avatar viric commented on September 26, 2024

Hello,
I knew how to test that imap.fetch. It failed for me. Can you check if the backslashes got right into the e-mail source?
Anyway, from the quote_re it is clear that it had to fail, isn't it? :)

from imap2maildir.

viric avatar viric commented on September 26, 2024

Additionally, to check the imap, I use to run your program with "python -d" enabling the debug in the imap module. That shows all imap traffic.

from imap2maildir.

rtucker avatar rtucker commented on September 26, 2024

I have committed the new quoted_re in commit f063493 which should be pushed shortly. Thanks :-)

from imap2maildir.

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.