Setup DTC on FreeBSD howto

This is a first attempt and it's not completed yet.

1. Install some of the dependencies for DTC (optional)

   cd /usr/ports/mail/maildrop
   make install WITH_AUTHLIB=yes NO_MAILWRAPPER=yes

When prompt, ask for MySQL and userdb support.

   cd /usr/ports/mail/courier-imap
   make install

If you don't want to choose dependencies "by hand" you can skip this step and use dtc-postfix-courier or dtc-toaster slave ports instead of the normal dtc one, so it will select all needed daemons.

2. Install the latest dtc bsd ports

   fetch ftp://ftp.gplhost.com/pub/dtc/bsd/dtcBSDport-0.27.2.1.tar.gz
   tar -zxf dtcBSDport-0.27.2.1.tar.gz

If you want to use DTC with courier-maildrop, courier, and some other tools, you can do this:

   cd sysutils/dtc
   make install WITH_WEBALIZER=yes WITH_AWSTATS=yes WITH_VISITORS=yes WITH_PUREFTPD=yes 
WITH_POSTFIX=yes WITH_APACHE2=yes WITH_PHP5=yes WITH_MAILDROP=yes WITH_COURIER_IMAP=yes
WITH_CYRUS_SASL2=yes WITH_SPAMASSASSIN=yes WITH_CLAMAV=yes WITH_AMAVIS=yes
WITH_SQUIRRELMAIL=yes WITH_PHPMYADMIN=yes

If you want the dtc-toaster which, for FreeBSD, uses currently Cyrus, you can do this:

   cd sysutils/dtc-toaster
   make install

Or use the dtc-postfix-courier slave port:

   cd sysutils/dtc-postfix-courier
   make install

3 Make sure mysql server is started and launch the 2nd stage installer

Add this in your /etc/rc.conf:

   mysql_enable="YES"

and issue the following command:

   /usr/local/etc/rc.d/mysql-server start

The you can start the DTC installer:

   dtc-install

3. Start the daemons required by DTC

Add the following to your /etc/rc.conf (depending on the daemon that you want to use):

   mysql_enable="YES"
   named_enable="YES"
   courier_imap_pop3d_enable="YES"
   courier_imap_imapd_enable="YES"
   courier_imap_pop3d_ssl_enable="YES"
   courier_imap_imapd_ssl_enable="YES"
   courier_authdaemond_enable="YES
   postfix_enable="YES"

4. Configure apache to accept connections

Comment out this from your /usr/local/etc/httpd.conf, otherwise you will get a forbidden access:

   #<Directory />
   #    AllowOverride AuthConfig FileInfo Limit Indexes
   #    Order deny,allow
   #    Deny from all
   #</Directory>

   -------------------------------

If you want to use the Git version, here's how:

   -------------------------------

1. Upgrade your ports collection

   pkg_add -r cvsup-without-gui
   cvsup -L 2 -h cvsup.FreeBSD.org /usr/share/examples/cvsup/ports-supfile

2. Upgrade your installed ports

   cd /usr/ports/ports-mgmt/portupgrade
   make install clean
   portupgrade -a

3. Install Git

   cd /usr/ports/devel/git
   make install clean

4. Copying all repository of dtc

   git clone http://git.gplhost.com/dtc.git

5. Making port & package

   cd dtc
   make bsd-ports-packages

6. Copying package to distfiles & installing port

   cd ..
   cp dtc-VERSION.tar.gz /usr/ports/distfiles
   tar -zxf dtcBSDport-VERSION.tar.gz
   cd sysutils/dtc
   make install

Of course replace VERSION by the release number.

Page last modified on December 24, 2007, at 07:39 PM EST