Fork 0
A self-service web application for Mail-in-a-box (https://mailinabox.email/).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
david 96d746cb29 added docker config and requirements.txt 3 years ago
static small changes 6 years ago
views fixed defunct forwarding feature 6 years ago
.gitignore edited .gitignor 6 years ago
CHANGELOG changed changelog 6 years ago
Dockerfile added docker config and requirements.txt 3 years ago
LICENSE Add license 6 years ago
README.md added email forwarding feature 6 years ago
app.conf.sample working alias management 6 years ago
app.py added docker config and requirements.txt 3 years ago
docker-compose.yml added docker config and requirements.txt 3 years ago
requirements.txt added docker config and requirements.txt 3 years ago



A self-service web application for Mail-in-a-box.
We run it here: https://accounts.socialnerds.org

It is a very simple web application for users to manage their Mail-in-a-box account. I wrote this as a python/bottlepy learning project and to service users at my own Mail-in-a-box. There might be more features in the future.


  • Login with Mail-in-a-box account
  • Change password
  • Manage email aliases
  • Delete own account (softdelete)


You need python installed (v3 or v2). Needed modules: requests, configparser, bottle(or just download bottlepy like below)

git clone git@socialg.it:socialnerds.org/accounts.git
cd accounts
wget https://raw.githubusercontent.com/bottlepy/bottle/0.12.10/bottle.py

Configure your app by renaming app.conf.sample into app.conf and edit accordingly.
Start it with:

python3 app.py

You should be able to see the login page at http://localhost:8000.


If you want to host this somewhere more prominent following links could help: (someday i might write up some real documentation)

This is what i did on an Ubuntu 16.04 server with apache2:

I enabled following Apache modules (for future instance balancing plans):

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_ajp
a2enmod rewrite
a2enmod deflate
a2enmod headers
a2enmod proxy_balancer
a2enmod proxy_connect
a2enmod proxy_html
a2enmod xml2enc

Apache vhost config:

<VirtualHost *:80>
    DocumentRoot /var/www/accounts/static
    ServerAdmin admin@domain.tld
    ServerName accounts.domain.tld

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/accounts_access.log combined

    Redirect permanent / https://accounts.domain.tld/

<IfModule mod_ssl.c>
<VirtualHost _default_:443>

	ServerAdmin admin@domain.tld
	ServerName accounts.domain.tld
	DocumentRoot /var/www/accounts/static

  <Directory />
    Options FollowSymLinks
    AllowOverride None

	ErrorLog ${APACHE_LOG_DIR}/accounts_ssl_error.log
	LogLevel warn
	CustomLog ${APACHE_LOG_DIR}/accounts_ssl_access.log combined

	SSLEngine on
  SSLCertificateFile /path/to/fullchain.pem
  SSLCertificateKeyFile /path/to/key.pem

  ProxyPreserveHost On
  ProxyPass / http://localhost:8000/
  ProxyPassReverse / http://localhost:8000/


Unit file for systemd. /lib/systemd/system/accounts.service
Enable service with sudo systemctl enable accounts.service

Description=Accounts App

ExecStart=/usr/bin/python3 /var/www/accounts/app.py