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
Simple start with no persistence
```
```bash
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
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
echo ' [+] Starting php'
php-fpm7
@ -22,8 +20,18 @@ touch /var/log/nginx/opentrashmail/web.error.log
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'
python mailserver.py

View file

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