QMAIL DEPENDS NEED TO BE INSTALLED FIRST
yum -y update
yum install httpd*
yum install mod*
yum install php*
yum install libtool*
yum install autoconf*
======================================
Note: yum reinstall centos-release
======================================
To install PHP 5.3 On centos 5.6
http://www.how2centos.com/installing-php-5-3-3-on-centos-5-5-tutorial/
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
yum install perl*
yum clean all && yum update
yum update kernel\*
yum install mysql*
or
yum install mysql-server mysql mysql-devel mysql-mmm
yum groupinstall “Development Tools”
yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
yum -y install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1
yum install perl* (Fedora)
yum install perl (centos )
yum install perl-Net* (Centos)
yum install perl-suidperl (Centos )
yum install openssl*
yum install libss-devel*
yum install perl-CPAN
yum install perl-ExtUtils-Embed
yum install perl-HTML*
perl -MCPAN -e shell
install Bundle::CPAN
yum install spamassassin spambayes perl-Archive-Tar perl-IO-Zlib
qmail install
mkdir /downloads
cd /downloads
wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
tar zxvf qmailrocks.tar.gz
cd /downloads/qmailrocks
mkdir -p /var/qmail
mkdir /usr/src/qmail
groupadd nofiles
useradd -g nofiles -d /var/qmail/alias -s /sbin/nologin -p’*’ alias
useradd -g nofiles -d /var/qmail -s /sbin/nologin -p’*’ qmaild
useradd -g nofiles -d /var/qmail -s /sbin/nologin -p’*’ qmaill
useradd -g nofiles -d /var/qmail -s /sbin/nologin -p’*’ qmailp
groupadd qmail
useradd -g qmail -d /var/qmail -s /sbin/nologin -p’*’ qmailq
useradd -g qmail -d /var/qmail -s /sbin/nologin -p’*’ qmailr
useradd -g qmail -d /var/qmail -s /sbin/nologin -p’*’ qmails
groupadd vchkpw
useradd -g vchkpw -d /home/vpopmail -s /sbin/nologin -p’*’ vpopmail
cd /usr/src/qmail
tar zxvf /downloads/qmailrocks/qmail-1.03.tar.gz
tar zxvf /downloads/qmailrocks/ucspi-tcp-0.88.tar.gz
mkdir -p /package
chmod 1755 /package
cd /package
tar zxvf /downloads/qmailrocks/daemontools-0.76.tar.gz
mkdir /var/log/qmail
cd /var/log/qmail
mkdir qmail-send qmail-smtpd qmail-pop3d
chown -R qmaill:root /var/log/qmail
chmod -R 750 /var/log/qmail
mkdir /var/qmail/supervise
cd /var/qmail/supervise
mkdir -p qmail-smtpd/log qmail-send/log qmail-pop3d/log
chmod +t qmail-smtpd qmail-send qmail-pop3d
##########################
NOTE
Applying qmail patch install normal qmail and Vpopmail and than install the pactch
############
cd /usr/src/qmail/qmail-1.03
patch </downloads/qmailrocks/patches/qmail-delphus-RELEASE.patch
echo 211 > /usr/src/qmail/qmail-1.03/conf-split
echo 255 > /usr/src/qmail/qmail-1.03/conf-spawn
vi conf-groups
nofiles
vi conf-vpopmail
/home/vpopmail/
cp /home/vpopmail/include/vauth.h .
cp /home/vpopmail/include/vlimits.h .
cp /home/vpopmail/include/vpopmail_config.h .
cp /home/vpopmail/include/vpopmail.h .
make man && make setup check
fatal: unable to find group qnofiles
make: *** [auto_uids.c] Error 111
./config-fast mohan.com
/downloads/qmailrocks
download vpopmail-5.4.30
tar -zxvf vpopmail-5.4.30.tar.gz
./configure –enable-logging=p –disable-clear-passwd
make install-strip
crontab -e
40 * * * * /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null
Install ucspi-tcp
cd /usr/src/qmail/ucspi-tcp-0.88/
RH 9/RHEL/Fedora/Slackware users: You will need to patch ucspi-tcp with an additional errno patch:
patch < /downloads/qmailrocks/patches/ucspi-tcp-0.88.errno.patch
make && make setup check
Install ucspi-tcp
Install Daemontools
cd /package/admin/daemontools-0.76
RH 9/RHEL/Fedora/Slackware users:You will need to patch daemontools with an additional errno patch:
cd /package/admin/daemontools-0.76/src
patch < /downloads/qmailrocks/patches/daemontools-0.76.errno.patch
cd /package/admin/daemontools-0.76
package/install
cp /downloads/qmailrocks/scripts/finalize/linux/pop3d_run /var/qmail/supervise/qmail-pop3d/run
cp /downloads/qmailrocks/scripts/finalize/linux/pop3d_log /var/qmail/supervise/qmail-pop3d/log/run
cp /downloads/qmailrocks/scripts/finalize/linux/smtpd_run /var/qmail/supervise/qmail-smtpd/run
cp /downloads/qmailrocks/scripts/finalize/linux/smtpd_log /var/qmail/supervise/qmail-smtpd/log/run
cp /downloads/qmailrocks/scripts/finalize/linux/send_run /var/qmail/supervise/qmail-send/run
cp /downloads/qmailrocks/scripts/finalize/linux/send_log /var/qmail/supervise/qmail-send/log/run
cp /downloads/qmailrocks/scripts/finalize/rc /var/qmail/
cp /downloads/qmailrocks/scripts/finalize/qmailctl /var/qmail/bin/
chmod 755 /var/qmail/rc /var/qmail/bin/qmailctl
chmod 751 /var/qmail/supervise/qmail-pop3d/run
chmod 751 /var/qmail/supervise/qmail-pop3d/log/run
chmod 751 /var/qmail/supervise/qmail-smtpd/run
chmod 751 /var/qmail/supervise/qmail-smtpd/log/run
chmod 751 /var/qmail/supervise/qmail-send/run
chmod 751 /var/qmail/supervise/qmail-send/log/run
echo ./Maildir > /var/qmail/control/defaultdelivery
echo 255 > /var/qmail/control/concurrencyremote
chmod 644 /var/qmail/control/concurrencyremote
echo 30 > /var/qmail/control/concurrencyincoming
chmod 644 /var/qmail/control/concurrencyincoming
echo ‘345600’ > /var/qmail/control/queuelifetime
ln -s /var/qmail/bin/qmailctl /usr/bin
ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /var/qmail/supervise/qmail-pop3d /service
echo ‘postmaster@mohan.com’ > /var/qmail/alias/.qmail-root
echo ‘postmaster@mohan.com’ > /var/qmail/alias/.qmail-postmaster
echo ‘postmaster@mohan.com’ > /var/qmail/alias/.qmail-mailer-daemon
ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymous
chmod 644 /var/qmail/alias/.qmail*
#########################################################################
touch mfcheck authreq chkuser heloreq maxrcpt
touch logregex
touch badhelo badmailfrom badmailto badmailfromnorelay badmailtonorelay dnsblskip
vi mfcheck =1
vi authreq =1
vi mfcheck =1
vi tlsreq = 1
After installation you should put some dnsbl lists into /var/qmail/control/dnsbllist, f.e.:
echo “sbl-xbl.spamhaus.org\ndul.dnsbl.sorbs.net” > /var/qmail/control/dnsbllist
taps
control/taps Contains a regex style list of addresses to tap and the email address to send the copy to, separated by a colon.
Examples
•To tap all email and send a copy to admin@example.com add a line like:
.*:admin@example.com
•To tap a whole domain and send a copy to admin@example.com add a line like:
.*@domain.com:admin@example.com
•To tap an individual email address and send a copy to archive@example.com add a line like:
user@domain.com:archive@example.com
#########################################################################
mv /usr/lib/sendmail /usr/lib/sendmail.old
mv /usr/sbin/sendmail /usr/sbin/sendmail.old
chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old
ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
rpm -qa | grep sendmail
sendmail-milter-8.14.4-20.fc15.x86_64
sendmail-cf-8.14.4-20.fc15.noarch
sendmail-8.14.4-20.fc15.x86_64
rpm -e –nodeps sendmail
rpm -e –nodeps sendmail-cf
rpm -e –nodeps sendmail-milter
rpm -qa | grep postfix
spamass-milter-postfix-0.3.2-1.fc15.noarch
postfix-2.8.3-1.fc15.x86_64
rpm -e –nodeps postfix spamass-milter-postfix
cd /downloads/qmailrocks/
tar zxvf ezmlm-0.53-idx-0.41.tar.gz
cd ezmlm-0.53-idx-0.41
make && make setup
cd /downloads/qmailrocks
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
make && make install
cd /downloads/qmailrocks
tar zxvf vqadmin-2.3.6.tar.gz
Qmail 64-bit
When building QmailRocks on 64-bit Linux you will see this error when you get to step 6, installing Vqadmin:
checking build system type… Invalid configuration `x86_64-unknown-linuxoldld’: machine `x86_64-unknown’ not recognized
configure: error: /bin/sh ./config.sub x86_64-unknown-linuxoldld failed
Go back to just before the step where you configure:
./configure –enable-cgibindir=/path/to/your/cgi-bin –enable-htmldir=/path/to/your/html/directory
Then run:
libtoolize –force
Now start over at the configure step again
copy config.guess and config.sub from vpomail directory to vqadmin directory because vqadmin has old config.guess and config.sub files does not have the definitions for the 64 bit operating systems.
/downloads/qmailrocks/vpopmail-5.4.13 # cp config.guess config.sub ../vqadmin-2.3.6
cp config.sub /downloads/qmr/vqadmin-2.3.7/
cp config.guess /downloads/qmr/vqadmin-2.3.7/
cd vqadmin-2.3.6
./configure –enable-cgibindir=/var/www/cgi-bin –enable-htmldir=/var/www/html
make && make install-strip
cd /var/www/cgi-bin/vqadmin
chmod 644 .htaccess
AuthType Basic
AuthUserFile /var/www/cgi-bin/vqadmin/.htpasswd
AuthName vQadmin
require valid-user
satisfy any
htpasswd -bc /var/www/cgi-bin/vqadmin/.htpasswd admin bija123
chmod 644 .htpasswd
cd /etc/httpd/conf.d
vi vqadmin.conf
<Directory “/var/www/cgi-bin/vqadmin”>
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow
</Directory>
/etc/init.d/httpd restart
http://192.168.1.12/cgi-bin/vqadmin/vqadmin.cgi/
cd /downloads/qmailrocks
tar zxvf maildrop-1.6.3.tar.gz
cd maildrop-1.6.3
./configure –prefix=/usr/local –exec-prefix=/usr/local –enable-maildrop-uid=root –enable-maildrop-gid=vchkpw –enable-maildirquota
make && make install-strip && make install-man
tar -zxvf qmailadmin-1.2.14.tar.gz
cd qmailadmin-1.2.14
./configure –enable-cgibindir=/var/www/cgi-bin/ –enable-htmldir=/var/www/html
–enable-imageurl=../../images –enable-imagedir=/var/www/html/images –enable-domain-autofill –enable-ezmlmdir=/usr/local/bin/ezmlm –enable-autorespond=/usr/bin/autorespond
make && make install-strip
echo ‘127.:allow,RELAYCLIENT=””‘ >> /etc/tcp.smtp
qmailctl cdb
vi /var/qmail/supervise/qmail-smtpd/run
exec /usr/local/bin/softlimit -m 600000000 \
exec /usr/local/bin/softlimit -m 600000000 \
qmailscanner
./configure –domain rmohan.com \
–admin postmaster \
–local-domains “rmohan.com” \
–add-dscr-hdrs yes \
–scanners vscan,verbose_spamassassin \
–dscr-hdrs-text “X-Antivirus-MYDOMAIN” \
–ignore-eol-check yes \
–sa-quarantine 0 \
–sa-delete 0 \
–sa-reject no \
–sa-subject “:SPAM:” \
–sa-alt yes \
–sa-debug no \
–notify admin \
MTRACK STRACK
# mtrack is a script to help understand the log output from qmail-send, by grouping together all of the log lines which pertain to a given message.
# strack is another log file tracking script. It does for qmail-smtpd logs what mtrack does for qmail-send logs
cd /var/qmail/bin/
wget http://qmail.jms1.net/scripts/mtrack
wget http://qmail.jms1.net/scripts/strack
chmod 751 mtrack strack
ln -s /var/qmail/bin/mtrack /usr/bin/
ln -s /var/qmail/bin/strack /usr/bin/
# test:
cat /var/log/qmail/qmail-send/current
cat /var/log/qmail/qmail-send/current | mtrack
cat /var/log/qmail/qmail-smtpd/current
cat /var/log/qmail/qmail-smtpd/current | strack
Recent Comments