Tuesday, September 2, 2008

Qmail behind Postfix on debian etch #1

I have been build mail server using qmail but i got a problem for filtering message, so i put Postfix to protect this mail server. Some article where i found just use qmail and postfix stand for different machine/pc, but here i will try explain to use in the same machine/pc, FYI: i use debian distribution and use qmailrocks for install qmail. In my system i use some partition for maintenance:
  • / --> 2 GB
  • Swap --> 1 GB
  • /var --> 4 GB
  • /home --> 66.2 GB
u can use another partition compisition. I install some other package where needed by qmail (i download it from kambing package repro), this is my step by step:
# apt-get install apache2
# apt-get install mysql-server-5.0
# apt-get install php5
# vim /etc/php5/apache2/php.ini
;extension=mysql.so to extension=mysql.so
# echo "" > /var/www/apache2-default/info.php
# apache2ctl stop; apache2ctl start

Now we can test this apache2-php5-mysql_server5 work well in our system using access info.php file from browser (http://you-server-ip-address/apache2-default/info.php), if in here you see something that mean php5 supporting to mysql, so the server is work well. We still need another package:
# apt-get install perl
# apt-get install gcc
# apt-get install openssl
# apt-get install libssl-dev
# apt-get install patchutils
# apt-get install make
# apt-get install libmysqlclient15-dev
# apt-get install g++

After this we are ready to install qmail, first we must download qmailrocks source from here.
# wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
# tar zxvf qmailrocks.tar.gz
# pwd
/root
# vim qmailrocks/scripts/install/qmr_install_linux-s1.script and replace
/downloads/ with /root/
# qmailrocks/scripts/install/qmr_install_linux-s1.script
#vim qmailrocks/scripts/util/qmail_big_patches.script and replace
/downloads/ with /root/
# qmailrocks/scripts/util/qmail_big_patches.script
# cd /usr/src/qmail/qmail-1.03/
# make man && make setup check
# ./config-fast fqdn_hostname (exp: mail.domain.com)
# make cert and follow the instruction
# chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem
# cd /usr/src/qmail/ucspi-tcp-0.88/
# patch < /root/qmailrocks/patches/ucspi-tcp-0.88.errno.patch
# make && make setup check
# cd /package/admin/daemontools-0.76
# cd src/
# patch < /root/qmailrocks/patches/daemontools-0.76.errno.patch
# cd ..
# package/install
# ps aux for see qmail service running well.

Qmail installation is done, next we will some supporting software for qmail

thx

No comments: