bandundu / email-archiver Goto Github PK
View Code? Open in Web Editor NEWEmail archiving tool for IMAP/POP3 accounts (early development)
Email archiving tool for IMAP/POP3 accounts (early development)
Enable previewing of common attachment types within the web interface
First of all, thank you for making a nice utility for archiving our emails! This is very much needed in the self hosting community.
I have some usability suggestions if I may.
User Interface
App Name/SEO Exposure
This is more or less a stumbling block I encountered, I discovered this through a blog (https://selfh.st/). When I came back to the app, I couldn't remember where this was in Github. So, a basic search online in a search engine, yielded many and I mean many results for "Briefbox" but nothing related to this.
General
Several projects here in GitHub utilize discussion groups within Github, this allows on topic discussion of the app while keeping the bugs and app issues contained within the "Issues" links.
Again, thank you for making this! This will fill the gap for the self-hosting community where the desire is to archive email.
It would be nice to allow users to just pull the image from the registry instead of the need to build them every time
Enhance the email parser to support complex structures, rich text, inline images, and nested attachments.
I now have this error:
2024-03-18 07:19:30,763 - ERROR - Exception details: Traceback (most recent call last):
File "/app/email_archiver.py", line 155, in fetch_and_archive_emails
decoded_sender_parts.append(part.decode(encoding or 'utf-8'))
LookupError: unknown encoding: unknown-8bit
I wonder why no mail has been archived yet. Is the operation only successful, if there is no error during the process? Because the logs show a lot of
2024-03-18 07:24:32,563 - INFO - Inserted email with UID b'18705' for account 1 into the database.
but still nothing in the dashboard.
Originally posted by @TheZoker in #12 (comment)
Users should be able to only do a docker-compose up without any other configuration needed
Got this error while adding a mail account:
web-1 | Traceback (most recent call last):
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1488, in __call__
web-1 | return self.wsgi_app(environ, start_response)
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1466, in wsgi_app
web-1 | response = self.handle_exception(e)
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
web-1 | response = self.full_dispatch_request()
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
web-1 | rv = self.handle_user_exception(e)
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
web-1 | rv = self.dispatch_request()
web-1 | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
web-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
web-1 | File "/app/app.py", line 58, in create_account
web-1 | email_archiver.create_account(conn, email, password, protocol, server, port)
web-1 | File "/app/email_archiver.py", line 257, in create_account
web-1 | client.login(email, password)
web-1 | File "/usr/local/lib/python3.9/imaplib.py", line 610, in login
web-1 | typ, dat = self._simple_command('LOGIN', user, self._quote(password))
web-1 | File "/usr/local/lib/python3.9/imaplib.py", line 1230, in _simple_command
web-1 | return self._command_complete(name, self._command(name, *args))
web-1 | File "/usr/local/lib/python3.9/imaplib.py", line 987, in _command
web-1 | arg = bytes(arg, self._encoding)
web-1 | UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 10: ordinal not in range(128)
The mail Account password cotains an ร
Add functionality for users to tag and label emails, supporting both predefined and custom tags.
To ensure features can be easily added in future on the front, the frontend should move from flask templates to full react based frontent application
Please add a ARM docker version. For use on raspberry pi this would be great :) thanks.
Title about says it all: after initial run, new emails on server are not fetched. Would be nice if could fetch new mails every day/hour, etc.
Could then be used as backup for servers mails.
Any plans to add functionality to clean unneeded e-mails ?
I imagine it by using the search function, pressing "Select all" and/or selecting/deselecting what I want to include/exclude and pressing delete button.
Otherwise this archive will quickly become a placeholder for a lot of spam messages.
Better this time. It was able to archive 1000 emails, but then hit the error:
email-archiver-web-1 | 2024-03-18 13:30:26,387 - ERROR - An error occurred during email archiving for account 1: 'NoneType' object is not subscriptable
email-archiver-web-1 | 2024-03-18 13:30:26,388 - ERROR - Exception details: Traceback (most recent call last):
email-archiver-web-1 | File "/app/email_archiver.py", line 133, in fetch_and_archive_emails
email-archiver-web-1 | raw_email = data[0][1]
email-archiver-web-1 | TypeError: 'NoneType' object is not subscriptable
Originally posted by @cirrusflyer in #11 (comment)
When using IMAP protocol, users should be able to select what available inboxes should be archived. Users should also be able to edit this later and add or remove inboxes afterward. Users should also have the possibility when deselecting a previously selected inbox to delete all mails of this inbox.
Hi
Currently trying to few the emails, but its in json format, any ideas how to convert it to eml?
Thank you
Develop OAuth authentication flows for major email providers to simplify account connection
I'd like to use this to archive an IMAP mailbox, but with read only permissions. Getting this error:
email-archiver-web-1 | raise self.readonly('%s is not writable' % mailbox)
email-archiver-web-1 | imaplib.IMAP4.readonly: INBOX is not writable
Does the software need to have write access for some reason?
Attachments for newly received emails during the application's runtime are incorrectly assigned to email_id 0 in the attachments table. This issue leads to attachments being associated with the wrong email, causing data inconsistency.
Log from start of Account 1 to Account 2:
2024-03-18 14:37:39,288 - ERROR - An error occurred during email archiving for account 1: expected string or bytes-like object
2024-03-18 14:37:39,288 - ERROR - Exception details: Traceback (most recent call last):
File "/app/email_archiver.py", line 160, in fetch_and_archive_emails
recipients_parts = email.header.decode_header(email_message['To'])
File "/usr/local/lib/python3.9/email/header.py", line 80, in decode_header
if not ecre.search(header):
TypeError: expected string or bytes-like object
2024-03-18 14:37:39,289 - INFO - Started email archiving for account 2.
2024-03-18 14:37:39,820 - ERROR - An error occurred during email archiving for account 1: expected string or bytes-like object
2024-03-18 14:37:39,820 - ERROR - Exception details: Traceback (most recent call last):
File "/app/email_archiver.py", line 160, in fetch_and_archive_emails
recipients_parts = email.header.decode_header(email_message['To'])
File "/usr/local/lib/python3.9/email/header.py", line 80, in decode_header
if not ecre.search(header):
TypeError: expected string or bytes-like object
2024-03-18 14:37:39,820 - INFO - Started email archiving for account 2.```
Getting this error on a Raspberry Pi 4:
email-archiver-web-1 | File "/app/app.py", line 8, in
email-archiver-web-1 | from flask_cors import CORS
email-archiver-web-1 | ModuleNotFoundError: No module named 'flask_cors'
When I try to archive my mail, I get this error:
2024-03-14 14:42:38,964 - ERROR - Exception details: Traceback (most recent call last):
File "/app/email_archiver.py", line 103, in fetch_and_archive_emails
client = imaplib.IMAP4_SSL(server, port)
File "/usr/local/lib/python3.9/imaplib.py", line 1324, in __init__
IMAP4.__init__(self, host, port, timeout)
File "/usr/local/lib/python3.9/imaplib.py", line 202, in __init__
self.open(host, port, timeout)
File "/usr/local/lib/python3.9/imaplib.py", line 1337, in open
IMAP4.open(self, host, port, timeout)
File "/usr/local/lib/python3.9/imaplib.py", line 312, in open
self.sock = self._create_socket(timeout)
File "/usr/local/lib/python3.9/imaplib.py", line 1328, in _create_socket
return self.ssl_context.wrap_socket(sock,
File "/usr/local/lib/python3.9/ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.9/ssl.py", line 1074, in _create
self.do_handshake()
File "/usr/local/lib/python3.9/ssl.py", line 1343, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)
I use IMAP with the port 143.
These are the ports provided by my hoster:
Which combination should I use to get this working? Thanks!
Since this app can already pull emails from a certain mailbox, it would be nice to also be able to push emails into another mailbox. This way mailboxes could be transferred from one server to another with the added bonus to make a backup of them / archiving them along the way.
Would be nice, if the export could keep folders (e.g. sent to sent, junk to junk etc.). Or even allow to custom pair folders (e.g. old-folder to new-folder).
Something similar to this application:
https://www.mailstore.com/en/products/mailstore-home/
Maybe this is out of scope for the application, but would be an amazing feature! Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.