If these instructions are outdated, please raise an issue or send us a Pull Request.
This app uses Elasticsearch for database to save the email data. Refer this official site's install instruction here or follow this steps. (Tested on Ubuntu)
- Enter this command to import the Elasticsearch PGP key
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
- Enter these commands step by step to install Elasticsearch from APT repository
sudo apt-get install apt-transport-https echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list sudo apt-get update && sudo apt-get install elasticsearch
- Enter these commands to start Elasticsearch automatically when the system boots up
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
- Enter this command to start Elasticsearch
sudo systemctl start elasticsearch.service
By default, elasticsearch has no security. Since your email may contain sensitive data, you must enable security.
- As root user, open
/etc/elasticsearch/elasticsearch.yml
and add this line to enable securityxpack.security.enabled: true
- Since your configuration changed, restart elastice search using this command
sudo systemctl restart elasticsearch.service
- Setup user passwords by running
sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto
- Save the password for the user
elastic
. This will be used when you connect to your Elasticsearch
- Clone this git repository
git clone https://github.com/garageScript/inbox.git
- Setup environment variables in
.env
fileSECRET=... // Value to encode session data. Any value works ADMIN_PW=... // Password that will be used to login to Inbox ELASTIC=... // Password for elasticsearch that you saved in previous step
- Install necassary packages:
npm i
- Run
init.js
file.node init.js
- When you run this file, it will initialize your elasticsearch database.
- Which means it clear all data of mails index, and create it with mapped keys.
- This will allow you to search the mail receiver's email address in elasticsearch.
- Run the app
node index.js
- You can see current version HERE