A NodeJS based mail archiver (see https://github.com/RobinWeitzel/MailArchiver)
865
There are a lot of awesome options out there to archive your e-mails.
However, all of them were basically a mail-server to which you had to forward all your E-Mails.
I did not want that.
Instead, I was looking for a solution that is constantly logged into my accounts and watches my inboxes.
Any time a new e-mail arrives, it quickly saves a copy and then waits for the next e-mail.
Because I could find no such solution I created one myself.
This is a NodeJS script meant to be run in a docker container (though it could also be run standalone with a little modification).
It automatically stores all new mails as files (as txt, html and json) using a directory structure based on the e-mail which recieved the mail, the current date and the subject of the e-mail.
To get started, simply type in the following command.
docker run -v <your-directory>:/archive -e user="<your-username>" -e password="<your-password>" -e host="<your-imap-host>" -e port="<your-imap-port>" -e name="<your-mail-name>" --name <your-container-name> -d --restart always robinweitzel/mail-archiver
Fill in the variables:
Once running, the script will store all new e-mails in the corresponding directory.
Optionally, you can also save the email in a MongoDB by providing the url and db name as an additional variable.
docker run -v <your-directory>:/archive -e user="<your-username>" -e password="<your-password>" -e host="<your-imap-host>" -e port="<your-imap-port>" -e name="<your-mail-name>" -e mongourl="<your-mongodb-url>" -e mongodb="<your-mongodb-name>" --name <your-container-name> -d --restart always robinweitzel/mail-archiver
Content type
Image
Digest
Size
333.5 MB
Last updated
over 7 years ago
docker pull robinweitzel/mail-archiver