The easiest way to install Mailur is to run bin/install script.

Replace everywhere with name of your server.

Pre-requirements: a server or LXC container with CentOS 7.
Default username and password: demo / demo

# prepare code
yum install -y git
git clone /opt/mailur
cd /opt/mailur

# run script

Open in the browser.


Change config in bin/env that looks like:

# used for creation of virtual mailboxes
# use a space separator for multiple users

# comment next line if you modify "/etc/dovecot/passwd.users"

# used in "bin/deploy" for nginx and certbot


export MLR_SECRET=$secret
export MLR_MASTER=root:$secret
export MLR_SIEVE=sieve:$secret
export MLR_IMAP_OFF=''

and run bin/install again, it's safe to run multiple times.

Deploy with https

Ensure proper $domain is set in bin/env.

Run bin/deploy. It will deploy all stuff behind nginx with free SSL certificate from Let's Encrypt.

Open in the browser.

IMAPS will be available on server too.

Import email from Gmail

Note: If you want use it without Gmail, you should deliver emails to /home/vmail/demo/mlr mailbox. In the future, it would be possible to import from other IMAP servers as well.

I use two-factor authentication for Gmail with app password for Mailur.

. bin/activate
mlr gmail demo set {gmail-username} {gmail-password}
mlr gmail demo --parse
# and install systemd service
user=demo bin/install-idle-sync

Master-master replication

I use two servers with master-master replication enabled.

For that for each user you should add userdb_mail_replica parameter with your second server in /etc/dovecot/passwd.users like: