added settings to docker and extended quickstart guide

This commit is contained in:
Chris 2019-08-16 21:54:17 +02:00
parent d577eb545b
commit 78c29d48fc
3 changed files with 32 additions and 7 deletions

View file

@ -53,11 +53,24 @@
# Quick start # Quick start
Simple start with no persistence
``` ```bash
docker run --it -p 25:25 -p 80:80 hascheksolutions/opentrashmail docker run --it -p 25:25 -p 80:80 hascheksolutions/opentrashmail
``` ```
Saving data directory on host machine
```bash
docker run -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail
```
Complete example with running as daemon, persistence and auto restart
```bash
docker run -d --restart=always --name opentrashmail -p 80:80 -p 25:25 -v /path/on/host/where/to/save/data:/var/www/opentrashmail/data hascheksolutions/opentrashmail
```
# How it works # How it works
The heart of Open Trashmail is a **python powered SMTP server** that listens on incoming emails and stores them as json objects. The server doesn't have to know the right Email domain, it will just **catch everything** it receives. You only have to **expose port 25 to the web** and set an **MX record** of your domain pointing to the IP adress of your machine. The heart of Open Trashmail is a **python powered SMTP server** that listens on incoming emails and stores them as json objects. The server doesn't have to know the right Email domain, it will just **catch everything** it receives. You only have to **expose port 25 to the web** and set an **MX record** of your domain pointing to the IP adress of your machine.

View file

@ -6,8 +6,6 @@ cd /var/www/opentrashmail
git pull git pull
echo ' [+] Starting php' echo ' [+] Starting php'
php-fpm7 php-fpm7
@ -22,8 +20,18 @@ touch /var/log/nginx/opentrashmail/web.error.log
nginx nginx
cd /var/www/opentrashmail/python echo ' [+] Setting up config.ini'
echo "[GENERAL]" > /var/www/opentrashmail/config.ini
if [ "$DOMAINS" != "" ]; then
echo "DOMAINS=$DOMAINS" >> /var/www/opentrashmail/config.ini
echo " [i] Active Domain(s): $DOMAINS"
fi
echo "[MAILSERVER]" >> /var/www/opentrashmail/config.ini
echo "PORT=25" >> /var/www/opentrashmail/config.ini
cd /var/www/opentrashmail/python
echo ' [+] Starting Mailserver' echo ' [+] Starting Mailserver'
python mailserver.py python mailserver.py

View file

@ -124,9 +124,13 @@ function accessAccount()
function generateAccount() function generateAccount()
{ {
var email = makeName()+'@'+domains[Math.floor(Math.random()*domains.length)]; if(domains===null)
alert("No domains configured in settings.ini")
loadAccount(email) else
{
var email = makeName()+'@'+domains[Math.floor(Math.random()*domains.length)];
loadAccount(email)
}
} }
function changeHash(val) function changeHash(val)