Step-by-step installation on Debian based systems

This is a short guide how to install mopher on debian based systems. If you don't understand what you're doing, please refer to the get started tutorial or the documentation.

Install prerequisites

To build mopher you need a few basic compiler tools and system libraries.

Optional packages:

Install prerequisites

root@host # apt-get install gcc make flex bison libmilter-dev libidn11-dev libspf2-dev libdb5.1-dev libmysqlclient-dev

Fix missing libmilter.so symlink

I have no clue why the libmilter.so symlink is missing in the libmilter package. Maybe I'll ask sometime. For now let's create the link manually.

root@host # cd /usr/lib
root@host # ln libmilter.so.1.0.1 libmilter.so

Download a recent copy of mopher

Dowload the latest stable version of mopher from the download section and unpack it to a local directory.

root@host # cd /usr/local/src
root@host # wget http://mopher.org/download/mopher-0.5.0.tar.gz
root@host # tar xzvf mopher-0.5.0.tar.gz
root@host # cd mopher-0.5.0

Build and install mopher

root@host # ./configure --sysconfdir=/etc
root@host # make
root@host # make install

Use common ./configure arguments like --prefix and --sysconfdir to adjust filesystem paths to your needs.

Add mopherd system user

root@host # useradd -r mopher

Configure mopher with persistent databases

Use the newly created user and group for the mopher daemon process and store all databases in the filesystem using the BerkeleyDB database driver.

mopherd.conf
mopherd_user          = "mopher"
mopherd_group         = "mopher"

table[state]          = {
    driver            = "bdb",
    path              = "/var/local/mopher/state.bdb"
}

table[greylist]       = {
    driver            = "bdb",
    path              = "/var/local/mopher/greylist.bdb"
}

table[counter_relay]  = {
    driver            = "bdb",
    path              = "/var/local/mopher/counter_relay.bdb"
}

table[counter_penpal] = {
    driver            = "bdb",
    path              = "/var/local/mopher/counter_penpal.bdb"
}

Don't forget to create the directory holding the database files:

root@host # mkdir /var/local/mopher
root@host # chown mopher:mopher /var/local/mopher
root@host # chmod 750 /var/local/mopher

Configure Postfix

If you're running postfix add the following line to your main.cf.

smtpd_milters = inet:localhost:44555

Start mopher

root@host # mopherd

Further reading

Congratulations, your mopher installation is up and running. Further information on mail filtering with mopher can be found here: