An implementation of Docker Mailserver and Rainloop
Install Aznable Mail by cloning its Github repository:
git clone https://github.com/aznable/mail.git
cd mail
cp .env.example .env
chmod a+x mail.sh
Replace HOSTNAME and DOMAIN from the .env file with the server hostname and its registered domain name:
###################################
# Mailserver settings
###################################
HOSTNAME=aznable
DOMAIN=aznable.test
ONE_DIR=0
POSTMASTER_ADDRESS=me@aznable.test
TIMEZONE=Asia/Manila
For the Rainloop webmail, the configuration is already set for a reverse proxy (using Aznable Infra):
###################################
# Let's Encrypt settings
###################################
LETSENCRYPT_MAIL=me@aznable.test
LETSENCRYPT_HOST=mail.aznable.test
###################################
# NGINX Proxy settings
###################################
VIRTUAL_HOST=mail.aznable.test
VIRTUAL_PATH=/
VIRTUAL_PORT=8888
However, if the implementation doesn't need a reverse proxy, kindly check the tutorial in this link for the setup.
To run the containers, just execute docker-compose up -d in the same directory:
$ docker-compose up -d
Once the mail server has started, create its first user:
$ mail.sh email add [EMAIL] [PASSWORD]
Then execute the generation of DKIM keys:
$ mail.sh config dkim
- Access the admin interface of Rainloop using the defined
VIRTUAL_HOSTin.envfile (e.gaznable.test?admin); - Sign in using
adminas the login and12345as its password; - Once signed in, select
Domainsfrom the sidebar and select theAdd Domainbutton; - Put the desired domain name in the
Nametextbox, and bothServertextbox in theIMAPandSMTPsections; - Select the
Testbutton to check if the specified configurations are working, it should turn green; - Once the test is successful, select the
Addbutton to add the new domain; and - Sign out to the admin interface and login to the webmail (e.g.
aznable.test) using the first email created