To compile from SVN These steps are made for an ubuntu version but if you “read between the lines” should work for any flavour.

Quick start :

Things you need

 apt-get install build-essential autoconf automake1.9 libtool libglib2.0-0 libglib2.0-dev libgmime2.1-dev libgmime2.1 asciidoc xmlto  libmysqlclient15-dev 

then

if you dont have libsieve installed already get it make it and install it from http://libsieve.sourceforge.net/ (note versions will change)

 $wget http://optusnet.dl.sourceforge.net/sourceforge/libsieve/libsieve-2.2.1.tar.gz
 $tar -xzf libsieve-2.2.1.tar.gz
 $cd libsieve-2.2.1
 $cd src
 $autoconf
 $autoreconf
 $./configure
 $make
 $make install
 
 svn checkout https://svn.ic-s.nl/svn/dbmail/trunk/dbmail
 cd dbmail
 autoreconf -i
 ./configure --with-mysql --with-sieve --localstatedir=/var/run/dbmail --sysconfdir=/etc/dbmail
 make
 sudo make install 

Details :

get svn if you don't already have it

 sudo apt-get install svn

personally i make a src directory in ~ to do all this in

 cd ~
 mkdir src
 cd src
 

download the svn version

 http://www.dbmail.org/index.php?page=download

or

 svn checkout https://svn.ic-s.nl/svn/dbmail/trunk/dbmail

then

 cd dbmail

to get into the directory where stuff gets put then try this

 autoreconf -i

You need automake 1.7 or later installed for this to work i believe (i was getting errors about “invalid unused variable name: `AM_LDFLAGS'”

apt-get install automake 

seems to install an older version so instead do

apt-get install automake1.9

if you do that and still get errors

 apt-get remove automake

Assuming that autoreconf worked. for the ./configure you want to tell it what databse and any additional bits you want i use mysql and want sieve so i do

 ./configure --with-mysql --with-sieve --localstatedir=/var/run/dbmail/ --sysconfdir=/etc/dbmail/

the last 2 variables are to set were we want it to put PID files and get its config from

this will run through a whole bunch of stuff

end result of which should look like

 DM_LOGDIR:     /var/log
 DM_CONFDIR:    /etc/dbmail/
 DM_STATEDIR:   /var/run/dbmail/
 USE_DM_GETOPT:
 GLIB:          -lglib-2.0
 GMIME:         -lgmime-2.0 -lz -lnsl -lgobject-2.0 -lglib-2.0
 MYSQL:         -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
 PGSQL:
 SQLITE:
 SIEVE:         -lsieve
 LDAP:
 SHARED:        yes
 STATIC:        no
 CHECK:         no

important bits to note are the mysql and sieve lines and that the top 3 lines point to where you want

now comes the 2nd most fun part

 make

this takes a while, on a 1.6ghz amd about 3-4 minutes

if you get errors about missing things you probbly dont have all the stuff needed to build it google for the command it says is missing and you will probbly find the package it needs. or just

 apt-cache search foo

and that may well do

the big moment

 sudo make install

by default this puts the files in

 /usr/local/sbin/

you can probbly fix this in the ./config line but eh

 cd /usr/local/sbin/
 sudo mv * /usr/sbin

then you need the init file and you're almost done. Init files for several distributions, including Ubuntu, are included in the DBMail distribution. Look in dbmail/contrib/startup-scripts for your distribution.

If you have an existing init file then all is well

sudo /etc/init.d/dbmail start

all should be well you can

 sudo tail /var/log/syslog -n50 

if you want to check what happened.

 
compile_svn.txt · Last modified: 2012/02/12 16:46 by are
 
DBMail is developed by Paul J Stevens together with developers world-wide