(原創)Install Qmail On solaris 10

disabled ftp telnet sendmail
svcadm disable svc:network/ftp
svcadm disable svc:network/telnet
svcadm disable svc:network/smtp:sendmail

vi /etc/profile
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/mysql/bin/:/usr/local/ssl/bin
PATH=$PATH:/usr/local/lib:/usr/sfw/lib/:/usr/lib:/usr/local/httpd/bin:/usr/local/mysql/share/mysql:/usr/local/mysql/bin:/usr/sfw/bin/
CC=gcc
CFLAGS="-O6"
CXX=gcc
CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"
CPPFLAGS="-I/usr/local/include -I/usr/sfw/include -I/usr/include -I/usr/local/ssl/include -I/usr/local/BerkeleyDB.4.2/include -I/usr/java/include"

. /etc/profile (or reboot)

install top 3.5.1
gunzip top-3.5.1-sol10-intel-local.gz
pkgadd -d top-3.5.1-sol10-intel-local


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setting apache 1.3.33
cp -rp /etc/apache/httpd.conf-example /etc/apache/httpd.conf
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

setting apache 2.0.52
cp -rp /usr/apache2/bin/apachectl /etc/init.d/apache2
vi /etc/init.d/apache2

RUNDIR=/var/run/apache2
if [ ! -d ${RUNDIR} ]; then
        /usr/bin/mkdir -p -m 755 ${RUNDIR}
fi

cp -rp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf

ln -s /etc/init.d/apache2 /etc/rc0.d/K16apache2
ln -s /etc/init.d/apache2 /etc/rc1.d/K16apache2
ln -s /etc/init.d/apache2 /etc/rc2.d/K16apache2
ln -s /etc/init.d/apache2 /etc/rc3.d/S50apache2
ln -s /etc/init.d/apache2 /etc/rcS.d/K16apache2


install php
gunzip libiconv-1.8-sol10-intel-local.gz
pkgadd -d libiconv-1.8-sol10-intel-local
gunzip gcc-3.3.6-sol10-intel-local.gz
pkgadd -d gcc-3.3.6-sol10-intel-local
gunzip zlib-1.2.3-sol10-x86-local.gz
pkgadd -d zlib-1.2.3-sol10-x86-local
gunzip libxml2-2.6.16-sol10-x86-local.gz
pkgadd -d libxml2-2.6.16-sol10-x86-local
gunzip php-5.0.4-sol10-x86-local.gz
pkgadd -d php-5.0.4-sol10-x86-local

cp -rp /usr/local/apache2/modules/libphp5.so /usr/apache2/libexec

vi +442 /etc/apache2/httpd.conf
DirectoryIndex index.html index.html.var index.php
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php .php
/etc/init.d/apache2 restart

vi /var/apache2/htdocs/index.php
<?php
phpinfo();
?>

http://IP/index.php

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setting mysql 4.0.15
groupadd -g 27 mysql
useradd -g mysql -u 27 mysql
/usr/sfw/bin/mysql_install_db --user=mysql
chown -R mysql:mysql /var/mysql
cp -rp /etc/sfw/mysql/mysql.server /etc/init.d/mysqld
/etc/init.d/mysqld start
ln -s /etc/init.d/mysqld /etc/rc3.d/S90mysql
ln -s /etc/init.d/mysqld /etc/rc0.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rc1.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rc2.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rcS.d/K90mysql
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


install mysql 4.0.21
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ln -s /usr/sfw/lib/libstdc++.so.6 /usr/sfw/lib/libstdc++.so.5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
gunzip mysql-4.0.21-sol10-intel-local.gz
pkgadd -d mysql-4.0.21-sol10-intel-local
groupadd -g 27 mysql
useradd -g mysql -u 27 mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R mysql:mysql /usr/local/mysql/var
cp -rp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
ln -s /etc/init.d/mysqld /etc/rc3.d/S90mysql
ln -s /etc/init.d/mysqld /etc/rc0.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rc1.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rc2.d/K90mysql
ln -s /etc/init.d/mysqld /etc/rcS.d/K90mysql
/etc/init.d/mysqld start


setting bind 9.2.4
groupadd -g 53 named
useradd -g named -u 53 named

vi /etc/nsswitch.conf
chang
hosts:      files
to
hosts:      files dns
vi /etc/resolv.conf
search com
nameserver 127.0.0.1

tar -xvf named.tar
chown -R named:named named
mv named /var/
cp -rp rndc.key /etc/
vi /etc/named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        pid-file "/var/named/named.pid";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

include "/etc/rndc.key";

zone "lvfans.com" IN {
        type master;
        file "lvfans.com.db";
};

vi /etc/init.d/named
#!/sbin/sh
#
# Dale Bewley
# Thu Jul 31 08:49:37 PDT 2003

case "$1" in
'start')
        if [ -z "$_INIT_PREV_LEVEL" ]; then
                set -- `/usr/bin/who -r`
                _INIT_PREV_LEVEL="$9"
        fi
        [ $_INIT_PREV_LEVEL = 2 -o $_INIT_PREV_LEVEL = 3 ] && exit 0
        echo 'starting named'
        /usr/sbin/named -u named
        ;;
'stop')
        echo 'stopping named'
        kill `cat /var/named/named.pid`
        ;;
'reload')
        /usr/sbin/rndc reload
        ;;
'restart')
        $0 stop
        sleep 2
        $0 start
        ;;
*)
        echo "Usage: $0 { start | stop | reload | restart }"
        exit 1
esac
exit 0

chmod 744 /etc/init.d/named

ln -s /etc/init.d/named /etc/rc3.d/S53named
ln -s /etc/init.d/named /etc/rc0.d/K53named
ln -s /etc/init.d/named /etc/rc1.d/K53named
ln -s /etc/init.d/named /etc/rc2.d/K53named
ln -s /etc/init.d/named /etc/rcS.d/K53named

/etc/init.d/named start


install qmail

pkgrm SUNWsndmu
pkgrm SUNWsndmr

gunzip make-3.80-sol10-intel-local.gz
pkgadd -d make-3.80-sol10-intel-local
gunzip diffutils-2.8.1-sol10-intel-local.gz
pkgadd -d diffutils-2.8.1-sol10-intel-local
gunzip automake-1.9-sol10-intel-local.gz
pkgadd -d automake-1.9-sol10-intel-local
gunzip autoconf-2.59-sol10-intel-local.gz
pkgadd -d autoconf-2.59-sol10-intel-local
gunzip coreutils-5.2.1-sol10-x86-local.gz
pkgadd -d coreutils-5.2.1-sol10-x86-local
gunzip db-4.2.52.NC-sol10-intel-local.gz
pkgadd -d db-4.2.52.NC-sol10-intel-local
crle -u -v -l /usr/local/lib:/usr/sfw/lib:/usr/lib:/lib:/etc/lib:/usr/local/BerkeleyDB.4.2/lib:/usr/share/lib:/usr/xpg4/lib:/usr/java/lib:/usr/ccs/lib:/usr/sadm/lib:/etc/security/lib:/opt/csw/lib:/usr/sfw/lib/mysql
(vi /var/ld/ld.config)
ln -s /usr/local/bin/gcc /usr/ccs/bin/cc

vi /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.6/install-tools/mkheaders.conf
Put the line SHELL=/bin/sh on the first line of the mkheaders.conf file.

/usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.6/install-tools/mkheaders -v

reboot

tar -xvf qmail.tar
cd qmail

./qmr_install_solaris-s1.script

cd ucspi-tcp-0.88
make && make setup check
cd ..

cd admin/daemontools-0.76
package/install
rm -rf /command && cp -rp command /command
cd ../..

vi /etc/inittab
replace
SV:123456:respawn:/command/svscanboot
with
SV:123456:respawn:/command/svscanboot </dev/null >/var/log/svscan 2>&1

cd qmail-1.03
./install_spamcontrol.sh
make man && make setup check
./config-fast 2068.net
cd ..
./finalize_solaris.script

mysql
grant select on vpopmail.* to vpopmailread@localhost identified by 'read-password';
grant all on vpopmail.* to vpopmail@localhost identified by 'vpopmail-password';
quit

gunzip vpopmail-5.4.10.tar.gz
tar -xvf vpopmail-5.4.10.tar
cd vpopmail-5.4.10
./configure \
--enable-auth-logging=y \
--enable-logging=v \
--enable-log-name=vpopmail \
--enable-auth-module=mysql \
--enable-roaming-users=n \
--enable-sqwebmail-pass=n \
--enable-many-domains=n \
--enable-domainquotas=y \
--enable-passwd=y \
--disable-clear-passwd \
--enable-tcpserver-file=/etc/tcp.smtp \
--enable-incdir=/usr/local/mysql/include/mysql \
--enable-libdir=/usr/local/mysql/lib/mysql \
--enable-libs=mysqlclient \
--enable-ip-alias-domains=y \
--enable-qmail-ext=y \
--enable-mysql-replication=n \
--enable-valias=n

make clean && make && make install-strip
cd ..

vi /home/vpopmail/etc/vpopmail.mysql
localhost|0|vpopmailread|read-password|vpopmail
localhost|0|vpopmail|vpopmail-password|vpopmail

vi /home/vpopmail/etc/vlimits.default

vi /var/spool/cron/crontabs/root
40 * * * * /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null

/home/vpopmail/bin/vadddomain test.com

reboot

install qmailadmin

gunzip ezmlm-0.53-idx-0.41.tar.gz
tar xvf ezmlm-0.53-idx-0.41.tar
cd ezmlm-0.53-idx-0.41
make && make setup
cd ..

gunzip autorespond-2.0.5.tar.gz
tar xvf autorespond-2.0.5.tar
cd autorespond-2.0.5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{make
cp autorespond /usr/bin
cp autorespond.1 /usr/share/man/man1
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
make && make install
cd ..

gunzip qmailadmin-1.2.9.tar.gz
tar -xvf qmailadmin-1.2.9.tar
cd qmailadmin-1.2.9
mkdir /var/apache2/qmailadmin
./configure --disable-ipauth --enable-cgibindir=/var/apache2/cgi-bin --enable-htmllibdir=/var/apache2/qmailadmin --enable-htmldir=/var/apache2/htdocs
make clean && make && make install-strip && cd ../..

http://IP/cgi-bin/qmailadmin

**************************************

gunzip gdbm-1.8.3-sol10-intel-local.gz
pkgadd -d gdbm-1.8.3-sol10-intel-local


install webmail
bzip2 -d sqwebmail-4.0.7.tar.bz2 && tar -xvf sqwebmail-4.0.7.tar && cd sqwebmail-4.0.7

mkdir /var/apache2/sqwebmail
./configure \
--with-cachedir \
--without-gzip \
--enable-webpass=yes \
--enable-softtimeout=1200 \
--enable-autopurge=7 \
--enable-maxpurge=90 \
--enable-unicode=big5 \
--enable-cgibindir=/var/apache2/cgi-bin \
--prefix=/var/apache2/sqwebmail \
--enable-imagedir=/var/apache2/htdocs/images/sqwebmail \
--enable-imageurl=/images/sqwebmail/ \
--with-maxargsize=20971520 \
--with-maxformargsize=20971520 \
--with-maxmsgsize=20971520 \
--without-ispell \
--with-authshadow \
--without-authmysql \
--with-authldap \
--with-authuserdb \
--with-authpwd \
--without-authpam \
--with-authvchkpw \
--without-authdaemon

make configure-check && make && make check && make install-strip && make install-configure
cd ..

cp /var/apache2/sqwebmail/libexec/sqwebmaild.rc /etc/init.d/sqwebmaild
ln -s /etc/init.d/sqwebmaild /etc/rc3.d/S80sqwebmaild
ln -s /etc/init.d/sqwebmaild /etc/rc0.d/K80sqwebmaild
ln -s /etc/init.d/sqwebmaild /etc/rc1.d/K80sqwebmaild
ln -s /etc/init.d/sqwebmaild /etc/rc2.d/K80sqwebmaild
ln -s /etc/init.d/sqwebmaild /etc/rcS.d/K80sqwebmaild
/etc/init.d/sqwebmaild start

http://IP/cgi-bin/sqwebmail
************************************************************************************************

bzip2 -d courier-imap-3.0.8.tar.bz2 && tar xvf courier-imap-3.0.8.tar && cd courier-imap-3.0.8
./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authdaemon --without-authldap --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib
ln -s /usr/sfw/include/openssl /usr/local/include
ln -s /usr/sfw/include/openssl /usr/include
make && make install-strip && make install-configure
cp /usr/local/etc/imapd.dist /usr/local/etc/imapd
cp /usr/local/etc/imapd-ssl.dist /usr/local/etc/imapd-ssl
/usr/local/sbin/mkimapdcert
vi +68 /usr/local/etc/imapd-ssl
IMAPDSSLSTART=YES
cp /usr/local/libexec/imapd.rc /etc/init.d/imap
cp /usr/local/libexec/imapd-ssl.rc /etc/init.d/imaps
ln -s /etc/init.d/imap /etc/rc3.d/S143imap
ln -s /etc/init.d/imap /etc/rc0.d/K143imap
ln -s /etc/init.d/imap /etc/rc1.d/K143imap
ln -s /etc/init.d/imap /etc/rc2.d/K143imap
ln -s /etc/init.d/imap /etc/rcS.d/K143imap
/etc/init.d/imap start
cd ..


gunzip squirrelmail-1.4.5.tar.gz
tar -xvf squirrelmail-1.4.5.tar
mv squirrelmail-1.4.5 /var/apache2/squirrelmail
gunzip all_locales-1.4.5-20050904.tar.gz
tar -xvf all_locales-1.4.5-20050904.tar
./install
/var/apache2/squirrelmail
chown -R webservd:webservd /var/apache2/squirrelmail
/var/apache2/squirrelmail/config/conf.pl
zh_TW
vi /etc/apache2/httpd.conf
Alias /webmail "/var/apache2/squirrelmail"

/etc/init.d/apache2 restart
http://IP/webmail


install clamd and spamd qmail-scanner
bzip2 -d maildrop-1.8.1.tar.bz2
tar xvf maildrop-1.8.1.tar
cd maildrop-1.8.1
./configure
make && make install-strip && make install-man
cd ..

gunzip gmp-4.1.2-sol9-intel-local.gz
pkgadd -d gmp-4.1.2-sol9-intel-local

gunzip clamav-0.87.1.tar.gz
tar xvf clamav-0.87.1.tar
cd clamav-0.87.1
groupadd -g 46 clamav
useradd -g clamav -d /tmp -s /bin/false -u 46 clamav
./configure
make && make check && make install && make clean
groupadd qscand
useradd -g qscand -s /bin/false qscand
mkdir /var/log/clamav
chown -R qscand:qscand /var/log/clamav
mkdir -p /var/lib/clamav
chown -R qscand:qscand /var/lib/clamav

vi /usr/local/etc/freshclam.conf

change
Example
to
#Example

change
#DatabaseDirectory /var/lib/clamav
to
DatabaseDirectory /var/lib/clamav

change
#UpdateLogFile /var/log/freshclam.log
to
UpdateLogFile /var/log/clamav/freshclam.log

change
#LogSyslog
to
LogSyslog

change
#DatabaseOwner clamav
to
DatabaseOwner qscand

true > /var/log/clamav/freshclam.log
chown qscand:qscand /var/log/clamav/freshclam.log

vi /var/spool/cron/crontabs/root
0 0,12 * * * /usr/local/bin/freshclam --quiet

/usr/local/bin/freshclam --quiet

vi /usr/local/etc/clamd.conf

change
Example
to
#Example

change
#LogFile /tmp/clamd.log
to
LogFile /var/log/clamav/clamd.log

change
#LogTime
to
LogTime

change
#LogSyslog
to
LogSyslog

change
#DatabaseDirectory /var/lib/clamav
to
DatabaseDirectory /var/lib/clamav

change
LocalSocket /tmp/clamd
to
#LocalSocket /tmp/clamd

change
#TCPSocket 3310
to
TCPSocket 3310

change
#User clamav
to
User qscand


vi /etc/init.d/clamd
#!/bin/sh

case $1 in
   'start' )
      if [ ! -d /var/run/clamav ] ; then
         mkdir /var/run/clamav
         chown -R qscand:qscand /var/run/clamav
      fi
      /usr/local/sbin/clamd
      ;;
   'stop' )
      kill `ps -ef | awk '$NF ~ /clamd/ { print $2 }'` > /dev/null 2>&1
      ;;
   'reload' )
      # Reload virus databases
      kill -USR2 `ps -ef | awk '$NF ~ /clamd/ { print $2 }'` > /dev/null 2>&1
      ;;
   *)
      echo "usage: $0 {start|stop|reload}"
esac

chmod 755 /etc/init.d/clamd
ln -s /etc/init.d/clamd /etc/rc3.d/S3310clamd
ln -s /etc/init.d/clamd /etc/rc0.d/K3310clamd
ln -s /etc/init.d/clamd /etc/rc1.d/K3310clamd
ln -s /etc/init.d/clamd /etc/rc2.d/K3310clamd
ln -s /etc/init.d/clamd /etc/rcS.d/K3310clamd
/etc/init.d/clamd start
cd ..

gunzip perl-5.8.5-sol10-intel-local.gz
pkgadd -d perl-5.8.5-sol10-intel-local
mv /usr/bin/perl /usr/bin/perl.bak
ln -s /usr/local/bin/perl /usr/bin/perl

gunzip Digest-SHA1-2.10.tar.gz
tar -xvf Digest-SHA1-2.10.tar
cd Digest-SHA1-2.10
perl Makefile.PL
make
make test
make install
cd ..

gunzip HTML-Tagset-3.04.tar.gz
tar -xvf HTML-Tagset-3.04.tar
cd HTML-Tagset-3.04
perl Makefile.PL
make
make test
make install
cd ..

gunzip HTML-Parser-3.47.tar.gz
tar -xvf HTML-Parser-3.47.tar
cd HTML-Parser-3.47
perl Makefile.PL
make
make test
make install
cd ..

gunzip DB_File-1.814.tar.gz
tar -xvf DB_File-1.814.tar
cd DB_File-1.814
vi config.in
change
INCLUDE = /usr/local/BerkeleyDB/include
to
INCLUDE = /usr/local/BerkeleyDB.4.2/include
change
LIB     = /usr/local/BerkeleyDB/lib
to
LIB     = /usr/local/BerkeleyDB.4.2/lib
perl Makefile.PL
make
make test
make install
cd ..

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Mail-SpamAssassin-3.1.0.tar.bz2

optional module missing: Net::DNS
optional module missing: Mail::SPF::Query
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: DBI
optional module missing: LWP::UserAgent
optional module missing: HTTP::Date
optional module missing: Archive::Tar
optional module missing: IO::Zlib

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


bzip2 -d Mail-SpamAssassin-3.0.4.tar.bz2
tar -xvf Mail-SpamAssassin-3.0.4.tar
cd Mail-SpamAssassin-3.0.4
perl Makefile.PL
make
make install
groupadd spamd
useradd -g spamd -s /bin/false -d /home/spamd spamd
mkdir /home/spamd
chown -R spamd:spamd /home/spamd
vi /etc/mail/spamassassin/local.cf
Add the following line...
# SpamAssassin config file for version 2.5x
# generated by http://www.yrex.com/spam/spamconfig.php (version 1.01)

# How many hits before a message is considered spam.
required_hits           5.0

# Whether to change the subject of suspected spam
rewrite_subject         1

# Text to prepend to subject if rewrite_subject is used
subject_tag             *****SPAM*****

# Encapsulate spam in an attachment
report_safe             1

# Use terse version of the spam report
use_terse_report        0

# Enable the Bayes system
use_bayes               1

# Enable Bayes auto-learning
auto_learn              1

# Enable or disable network checks
skip_rbl_checks         0
use_razor2              1
use_dcc                 1
use_pyzor               1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
# - chinese english
ok_languages            zh en

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales              en zh

cp -rp spamd/solaris-rc-script.sh /etc/init.d/spamd
vi /etc/init.d/spamd
SPAMDOPTIONS="-x -u spamd -H /home/spamd -d"
change
                spamd -d -c
to
                spamd $SPAMDOPTIONS --syslog-socket=inet
change
        /usr/bin/pkill -9 -x -u 0 '(spamd)'
to
        /usr/bin/pkill -9 -x -u spamd '(spamd)'

/etc/init.d/spamd start
ln -s /etc/init.d/spamd /etc/rc3.d/S783spamd
ln -s /etc/init.d/spamd /etc/rc0.d/K783spamd
ln -s /etc/init.d/spamd /etc/rc1.d/K783spamd
ln -s /etc/init.d/spamd /etc/rc2.d/K783spamd
ln -s /etc/init.d/spamd /etc/rcS.d/K783spamd
cp sample-* /home/spamd
vi /etc/passwd
change /bin/false to /bin/sh
su - spamd
spamassassin -t < sample-spam.txt
spamassassin -t < sample-nonspam.txt
exit
vi /etc/passwd
change /bin/sh to /bin/false
cd ..


gunzip unzip-5.50-sol8-intel-local.gz
pkgadd -d unzip-5.50-sol8-intel-local
mv /usr/bin/unzip /usr/bin/unzip.bak
ln -s /usr/local/bin/unzip /usr/bin/unzip

gunzip qmail-scanner-1.25.tgz
tar -xvf qmail-scanner-1.25.tar
cd qmail-scanner-1.25
./configure --admin postmaster --domain test.com --scanners clamdscan,fast_spamassassin --notify recips --qmail-queue-binary /var/qmail/bin/qmail-queue --install
login NOT root account
/var/qmail/bin/qmail-scanner-queue.pl -z
vi /service/qmail-smtpd/run
QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue.pl
export QMAILQUEUE
vi /var/qmail/bin/qmail-scanner-queue.pl
chang
my $spamc_subject='';
to
my $spamc_subject='+++++Trash+++++';
qmailctl restart
./contrib/test_installation.sh -doit
cd ..

reboot