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

Replace everywhere with name of your server.

Pre-requirements: a server or podman container with CentOS 8.
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

# used as password for dovecot master users
# used as "doveadm_password"

# used by cli/web application
export MLR_DOMAIN=$domain
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 & send emails

. bin/activate

# using Gmail (demo is our user)
mlr demo remote-setup-gmail {username} {password}

# or using general IMAP/SMTP server
mlr demo remote-setup-imap {username} {password}

# initial import
mlr demo remote --parse

# and install systemd service to import new messages
user=demo bin/install-idle-sync

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

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: