2024-03-05 19:54:06 -07:00
|
|
|
# imap-archiver
|
|
|
|
|
2024-03-05 23:57:38 -07:00
|
|
|
_Archive the content on your email account._
|
|
|
|
|
|
|
|
A very simple way to sync your email account with the goal of backing up all your emails.
|
|
|
|
|
|
|
|
Saves attachments to disk and stores the emails in an SQLite database.
|
|
|
|
|
2024-03-06 14:34:34 -07:00
|
|
|
A very simple web viewer is provided to view your raw emails.
|
|
|
|
|
|
|
|
Does not support different accounts.
|
2024-03-05 23:57:38 -07:00
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2024-03-06 18:17:08 -07:00
|
|
|
### Archiver
|
|
|
|
|
2024-03-05 23:57:38 -07:00
|
|
|
1. Create a venv
|
|
|
|
2. `pip install -r requirements.txt`
|
|
|
|
3. `cp config.yml.sample config.yml`
|
|
|
|
4. Edit `config.yml` and configure your login info.
|
2024-03-06 18:17:08 -07:00
|
|
|
5. `python3 archiver.py`
|
|
|
|
|
|
|
|
### Viewer
|
|
|
|
|
|
|
|
1. `sudo mkdir /etc/secrets`
|
|
|
|
2. `sudo chown -R root:root /etc/secrets`
|
|
|
|
3. Generate your password:
|
|
|
|
```shell
|
|
|
|
echo -n "<your password>" | base64
|
|
|
|
```
|
|
|
|
4. Edit `/etc/secrets/imapviewer` with this content:
|
|
|
|
```shell
|
|
|
|
SQLITE3_DB=<path to your sqlite3 database>
|
|
|
|
HTTP_AUTH_PASS=<your encoded password>
|
2024-07-18 18:21:05 -06:00
|
|
|
EMAIL_ARCHIVE_ROOT=<archive root path>
|
|
|
|
```
|
2024-03-06 18:17:08 -07:00
|
|
|
5. `sudo chmod 600 /etc/secrets/imapviewer`
|
|
|
|
6. Reload and start the service.
|
|
|
|
|
|
|
|
Sample systemd services file is included.
|
2024-03-05 23:57:38 -07:00
|
|
|
|
|
|
|
## To Do
|
|
|
|
|
2024-03-06 11:36:43 -07:00
|
|
|
- [ ] Fix subject decoding. Some character sets aren't detected correctly.
|
2024-03-06 17:22:42 -07:00
|
|
|
- [ ] In the viewer, format the raw email to something viewable.
|