Lets start by installing gcc for s/qmail. Install all dependancies with default options.


# cd /usr/ports/lang/gcc48
# # make install clean
# cd /usr/local/bin
# ln -s gcc48 gcc

libsrs2 is the next generation SRS library from the original designer of SRS.Lets install it!


# cd /usr/ports/mail/libsrs2
# make install clean

Now lets get all qmail depenecies and sqmail itself.


# cd /root
# fetch https://freebsdrocks.net/qmail2/sqmail_files.tgz
# tar zxvf sqmail_files.tgz
# rm sqmail_files.tgz
# cd qmail
# tar zxf ucspi-tcp6-1.11.4.tgz
# tar zxf fehQlibs-14.tgz
# tar zxf ucspi-ssl-0.11.4.tgz
# tar zxf sqmail-4.0.04.tgz

The next step is to install daemontools. Lets do it!


# cd /usr/ports/sysutils/daemontools
# make install clean

cdb is a fast, reliable, lightweight package for creating and reading constant databases. Lets install it.


# cd /usr/ports/databases/cdb
# make install clean

fehQlibs provide a basic framework for byte, string, I/O, socket, and IPv4/IPv6 handling in addition with the constant database cdb together with dnsstub resolver routines for Internet services applying the same or an even enhanced API.


# cd /root/qmail/fehQlibs-14
# make
# cd ../

I copy the qlib dir to package/ids to the destination instead of linking


# cp -R fehQlibs-14 /usr/local/qlibs

tcpserver and tcpclient are easy-to-use command-line tools for building TCP client-server applications.


# cd /root/qmail/net/ucspi-tcp6/ucspi-tcp6-1.11.4
# package/compile

sslserver listens for IPv6 and/or IPv4 connections, and runs a program for each connection it accepts. The program environment includes variables that hold the local and remote host names, IP addresses, and port numbers. sslserver offers a concurrency limit on acceptance of new connections, and selective handling of connections based on client identity supporting CIDR IP address notation. sslserver supports STARTTLS and STLS.


# cd /root/qmail/host/superscript.com/net/ucspi-ssl-0.11.4
# package/compile
# cp command/* /usr/local/bin

Now lets install s/qmail


# cd /root/qmail/mail/sqmail/sqmail-4.0.04

Now lets finish the install:


# echo '/root/qmail/host/superscript.com/net/ucspi-ssl-0.11.4' > conf-ucspissl
# mkdir /service
# package/dir
# package/ids
# package/ucspissl
# package/compile
# package/install
# echo "csh -cf '/usr/local/bin/svscanboot &'" >> /etc/rc.local
# csh -cf '/usr/local/bin/svscanboot &'
# ps aux | grep svscan
# cd /service
# svstat * */log
# svc -u * */log