Giter VIP home page Giter VIP logo

imap-attachment-extractor's People

Contributors

damienalbert avatar danamir avatar outermedia-cbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imap-attachment-extractor's Issues

Python-error (large mailbox)

Hi (great tool - thanks for providing it!!!)

I tried with a smaller mailbox first: no issues. Second test was with a mailbox with >65656 messages in INBOX.
macOS Intel - recent version - Py 3.10 (brew)
I see this result:

(.env) tschloss@Mac-mini imap-attachment-extractor % imap_aex --password -d "2022-08-07"
Password:
[Dry-run] Create extract dir /Users/tschloss/Programming/imap-attachment-extractor/INBOX.
Selected folder 'INBOX' (64556 mails).
45 messages corresponding to search.
1 messages with attachments.

Parsing mail: 'cronjob p487261 Update mvonline' [2022-08-07 05:40:06]
  Attachment 'p487261_Update mvonline.log' size (129.0B) is smaller than defined threshold (100.0KB), leave intact.
  Nothing extracted.
Traceback (most recent call last):
  File "/Users/tschloss/Programming/imap-attachment-extractor/.env/bin/imap_aex", line 33, in <module>
    sys.exit(load_entry_point('imap-attachment-extractor', 'console_scripts', 'imap_aex')())
  File "/Users/tschloss/Programming/imap-attachment-extractor/imap_aex.py", line 860, in cli
    main(options, defaults)
  File "/Users/tschloss/Programming/imap-attachment-extractor/imap_aex.py", line 852, in main
    imap.extract(**extract_kwargs)
  File "/Users/tschloss/Programming/imap-attachment-extractor/imap_aex.py", line 422, in extract
    mail = message_from_bytes(fetch[1])  # type: EmailMessage
  File "/usr/local/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/email/__init__.py", line 46, in message_from_bytes
    return BytesParser(*args, **kws).parsebytes(s)
  File "/usr/local/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/email/parser.py", line 122, in parsebytes
    text = text.decode('ASCII', errors='surrogateescape')
AttributeError: 'int' object has no attribute 'decode'

Any ideas? Something wrong on my side?

Thank you
Thomas

AttributeError: 'list' object has no attribute 'encode'

Extracted 3 attachments, replacing email.
Append message on IMAP server.
Delete original message.
Traceback (most recent call last):
File "/home/pengu/aurore/imap-attachment-extractor/.env/bin/imap_aex", line 11, in
load_entry_point('imap-attachment-extractor', 'console_scripts', 'imap_aex')()
File "/home/pengu/aurore/imap-attachment-extractor/imap_aex.py", line 824, in cli
main(options, defaults)
File "/home/pengu/aurore/imap-attachment-extractor/imap_aex.py", line 816, in main
imap.extract(**extract_kwargs)
File "/home/pengu/aurore/imap-attachment-extractor/imap_aex.py", line 493, in extract
attachment_content = part.get_payload().encode("utf-8")
AttributeError: 'list' object has no attribute 'encode'

"Could not search in"

Hi, I get this error:

"Selected folder 'INBOX' (10 mails).
Warning: Could not search in INBOX"

What went wrong?

Thanks in advance.

cu
F. :-)

Some clients show replaced message with current timestamp

Hi, I have a second issue:

After altering a message with the tool, Apple Mail (macOS) shows the message with the current time, not the original timestamp.
Same problem with the webmail frontend of the provider Strato.

Mailmate does not show this wrong date.

When inspecting the source of the mail in the webmail frontend I could NOT find any time field which is altered. So I am not sure if somebody stores metadata besides the source text of a message?

I do not have this behavior when I remove attachments with Mailmate or Apple Mail. Not sure if these applications have another mechanism than "delete & append"?

Any ideas?

Thomas

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.