GitHub address: https://github.com/aspettl/mailadmin
Mailadmin is a simple tool to manage email domains, accounts and alias addresses conveniently. It targets systems where there is only a handful of users who want to manage their own domains. It is not meant to be used by end users (those using the mailboxes) - however, there is an API for the Roundcube password plugin.
It was developed to manage a mailserver running with docker-mailserver. However, it could be used to produce configuration files for any mailserver setup, e.g. Postfix with Dovecot.
- UI features
- manage domains and domain aliases
- support domain catchalls
- mailboxes for end users
crypt
-based password hashes- "Have I Been Pwned" password check
- optional email forwarding
- alias addresses
- blackhole addresses
- manage domains and domain aliases
- multiple "admin" users
- one user can manage only his or her domains
- config export to
docker-mailserver
- Roundcube password plugin API
Prebuilt images for the latest commit of the main
branch are available via
DockerHub:
Releases are pushed with the version number as docker image tag.
Requirements:
- Ruby (see
.ruby-version
) and bundler forbundle install
to install all dependencies. - MariaDB or MySQL database server should be already running. The connection is
established via the socket
/var/run/mysqld
. Expected user name ismailadmin
, password empty, all privileges formailadmin_
-prefixed databases.
Create the database via rails db:create
, rails db:migrate
to
apply migrations, rails db:fixtures:load
for some example data, rails server
to start and log in at http://localhost:3000 with "alice@example.com" and
password "test".
You can use docker-compose build
to build all docker images.
Use docker-compose up -d
and docker-compose down
. Have a look at the
configuration in docker-compose.yml
and the Dockerfile
defaults for
environment variables.
Note: When the container starts, it will automatically apply database migrations.
There is no UI to manage admin users.
To create a user, "docker exec" or "kubectl exec" into the container and run
bundle exec rails console
. Then, use
User.create! do |u|
u.email = 'yourname@example.com'
u.password = 'passwordwithatleast10chars'
end
Note that every user is allowed to create new domains. There is only a check that new subdomains must not belong to a domain of a different user.
See docker-compose.yml
and integrations/docker-mailserver-configreload
.
Roundcube will typically connect via IMAP to docker-mailserver and not need
any special configuration. The only exception is when Roundcube users should be
able to change their account passwords, see integrations/roundcube-password-plugin
.