added settings to docker and extended quickstart guide
This commit is contained in:
parent
d577eb545b
commit
78c29d48fc
15
README.md
15
README.md
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -123,11 +123,15 @@ function accessAccount()
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateAccount()
|
function generateAccount()
|
||||||
|
{
|
||||||
|
if(domains===null)
|
||||||
|
alert("No domains configured in settings.ini")
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var email = makeName()+'@'+domains[Math.floor(Math.random()*domains.length)];
|
var email = makeName()+'@'+domains[Math.floor(Math.random()*domains.length)];
|
||||||
|
|
||||||
loadAccount(email)
|
loadAccount(email)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeHash(val)
|
function changeHash(val)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue