Installing binary tarball on Ubuntu

Install dependencies

sudo apt-get install adduser authbind openjdk-7-jre-headless unzip

Download and extract the binary release into /opt/mireka

# Mireka version to be installed VERSION=4.2.0 cd ~ # Download binary package: wget$VERSION/mireka-$ # Extract it unzip mireka-$ # No more need for the downloaded archive rm mireka-$ # Move the extracted content to /opt/mireka sudo mv mireka-$VERSION /opt/mireka cd /opt/mireka

Create a user account named mireka, Mireka will run as that user

# Create mireka user sudo adduser --system --home /opt/mireka --no-create-home --group --disabled-password --shell /bin/false mireka

Setup file ownerships

# Set the default: owned by root, readable by everybody sudo chown -R root:root . # Logs are writable by mireka, and readable by operators and nobody else. sudo chown -R mireka:adm log sudo chmod 2750 log # Directories containing mails are writable by mireka and nobody else can see them. sudo chown -R mireka:mireka maildrops postmaster queues sudo chmod 750 maildrops postmaster queues # The configuration file which contains passwords are writable only to root, # readable for mireka, others must not see it. sudo chown root:mireka conf/global-users.js sudo chmod 640 conf/global-users.js

Configure authbind to enable Mireka to listen on the standard mail ports while running as non-root. These ports are lower than 1024, and by default are reserved for root.

# authbind in Ubuntu 12.10 require ports in the 512-1023 to be included in files starting with ! MIREKA_UID=$(id -u mireka) echo -e ",25\n0.0.0.0/0:110,110\n0.0.0.0/0:587,587" | sudo tee /etc/authbind/byuid/$MIREKA_UID /etc/authbind/byuid/\!$MIREKA_UID

Install Upstart job configuration file to run Mireka as a dameon and start it.

sudo cp doc/examples/daemon/upstart.conf /etc/init/mireka.conf sudo start mireka

You will find the log files in /opt/mireka/log, the configuration files in /opt/mireka/conf. The Mireka home dir is /opt/mireka.

You can start it using sudo start mireka and stop it using sudo stop mireka.