INSTALASI QMAIL SERVER (PAKET QMAILROCK) Mauladi
http://prime-strategy.co.id http://prime-stretegy.co.jp System, Prime Strategy Indonesia
Banyak disadur dari: http://www.qmailrocks.org dan http://akprind.ac.id/hmjukm/ksl/var/workshop.qmail.server.pdf 1 Instalasi qmail Sebagai informasi, pada tutorial ini menggunakan: [admin@www ~]$ cat /proc/meminfo |grep MemTotal MemTotal: 970748 kB [admin@www ~]$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 44 model name : AMD Sempron(tm) Processor 2800+ stepping : 2 cpu MHz : 1608.421 cache size : 256 KB [admin@www ~]$ uname -a Linux www.my.domain 2.6.16-1.2111_FC4 #1 Sat May 20 19:59:40 EDT 2006 i686 athlon i386 GNU/Linux [admin@www ~]$ gcc -v Using built-in specs. Target: i386-redhat-linux Thread model: posix gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
1.2 Download dan ekstrak paket qmailrocks Pertama, buat folder di /downloads. Dalam langkah-langkah instalasi menggunakan folder /downloads. Untuk mempermudah mengikuti instalasi ini, gunakan folder dan cara yang sama dengan tutorial ini.
[root@server02 /]# mkdir downloads [root@server02 /]# cd /downloads/ [root@server02 downloads]# wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz [root@server02 downloads]# tar zxvf qmailrocks.tar.gz ]# pwd;ls /downloads qmailrocks qmailrocks.tar.gz [root@server02 downloads]# /downloads/qmailrocks/scripts/install/qmr_install_linux-s1.script [root@server02 downloads]# /downloads/qmailrocks/scripts/util/qmail_big_patches.script [root@server02 downloads]# cd /usr/src/qmail/qmail-1.03 [root@server02 qmail-1.03]# make man && make setup check [root@server02 qmail-1.03]# ./config-fast your_hostname (contoh: ./config-fast sakura4.prilog.net)
Selanjutnya membuat sertivikat keamaanan (sesuaikan dengan kondisi domain Anda): [root@server02 qmail-1.03]# make cert Country Name (2 letter code) [GB]:JP State or Province Name (full name) [Berkshire]:Tky Locality Name (eg, city) [Newbury]:Tky Organization Name (eg, company) [My Company Ltd]:prilog.net Organizational Unit Name (eg, section) []:mail Common Name (eg, your name or your server's hostname) []:mail.prilog.net
Email Address []:
[email protected] [
[email protected]]# chown /var/qmail/control/servercert.pem
-R
vpopmail:qmail
/var/qmail/control/clientcert.pem
1.3 Install ucspi-tcp [root@server02 qmail-1.03]# cd /usr/src/qmail/ucspi-tcp-0.88/ [root@server02 ucspi-tcp-0.88]# patch < /downloads/qmailrocks/patches/ucspi-tcp-0.88.errno.patch [root@server02 ucspi-tcp-0.88]# make && make setup check 1.4 Install daemontools [root@server02 daemontools-0.76]# cd /package/admin/daemontools-0.76/src [root@server02 src]# patch < /downloads/qmailrocks/patches/daemontools-0.76.errno.patch [root@server02 src]# cd /package/admin/daemontools-0.76 [root@server02 daemontools-0.76]# package/install Lihat efek daemontools dengan perintah ps -aux:
1.5 Install Ezmlm [root@server02 [root@server02 [root@server02 [root@server02
daemontools-0.76]# cd /downloads/qmailrocks/ qmailrocks]# tar zxvf ezmlm-0.53-idx-0.41.tar.gz ezmlm-0.53-idx-0.41]# cd ezmlm-0.53-idx-0.41 ezmlm-0.53-idx-0.41]# make && make setup
1.6 Install autorespon
[root@server02 [root@server02 [root@server02 [root@server02
ezmlm-0.53-idx-0.41]# cd /downloads/qmailrocks qmailrocks]# tar zxvf autorespond-2.0.5.tar.gz qmailrocks]# cd autorespond-2.0.5 autorespond-2.0.5]# make && make install
1.7 Install Vpopmail [root@server02 [root@server02 [root@server02 [root@server02 [root@server02
autorespond-2.0.5]# cd /downloads/qmailrocks qmailrocks]# tar zxvf vpopmail-5.4.13.tar.gz qmailrocks]# cd vpopmail-5.4.13 vpopmail-5.4.13]# ./configure –enable-logging=p vpopmail-5.4.13]# make && make install-strip
1.8 Install Vqadmin [root@server02 qmailrocks]# cd /downloads/qmailrocks [root@server02 qmailrocks]# tar zxvf vqadmin-2.3.6.tar.gz [root@server02 qmailrocks]# cd vqadmin-2.3.6 Sesuaikan dengan kondisi letak folder cgi-bin dan DocumentRoot (lihat httpd.conf) Anda , secara devault cgi-bin di /var/www/cgi-bin dan documentRoot di /var/www/html. [root@server02 vqadmin-2.3.6]# ./configure --enable-cgibindir=/home/htdocs/cgi-bin htmldir=/home/htdocs/www [root@server02 vqadmin-2.3.6]# make && make install-strip Tambahkan script berikut pada httpd.conf (ingat; sesuaikan dengan letak folder cgi-bin Anda):
deny from all Options ExecCGI AllowOverride AuthConfig Order deny,allow
Untuk membatasi pengaksesas vqadmin melalui web kita perlu membuat password: [root@server02 vqadmin-2.3.6]# cd /home/htdocs/cgi-bin/vqadmin/ [root@server02 vqadmin]# vi .htaccess
Tambah atau modifikasi menjadi: AuthType Basic #(Silahkan disesuikan) AuthUserFile /etc/httpd/conf/vqadmin.passwd AuthName vQadmin require valid-user satisfy any Setelah disimpan, kemudian lanjutkan perintah: [root@server02 vqadmin]# touch /etc/httpd/conf/vqadmin.passwd (Silahkan disesuikan) [root@server02 vqadmin]# chown apache .htaccess [root@server02 vqadmin]# chmod 644 .htaccess [root@server02 vqadmin]# htpasswd -bc /etc/httpd/conf/vqadmin.passwd admin passwdadminnya Adding password for user admin [root@server02 vqadmin]# chmod 644 /etc/httpd/conf/vqadmin.passwd Restart apache:
–enable-
[root@server02 vqadmin]# /etc/rc.d/init.d/httpd stop httpd : [ OK ]
を停止中
[root@server02 vqadmin]# /etc/rc.d/init.d/httpd start httpd : [ OK ]
を起動中
Jika Berjalan dengan baik, Anda bisa mengunjungi via web http://hostname_anda/cgi-bin/vqadmin/vqadmin.cgi. Anda akan ditanyai user name dan password, silahkan masukan sesuai perintah yang Anda lakukan tadi.
1.9 Install Maildrop [root@server02 cgi-bin]# cd /downloads/qmailrocks [root@server02 qmailrocks]# tar zxvf maildrop-1.6.3.tar.gz [root@server02 qmailrocks]# cd maildrop-1.6.3 [root@server02 maildrop-1.6.3]# ./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildropuid=root --enable-maildrop-gid=vchkpw –enable-maildirquota [root@server02 maildrop-1.6.3]# make && make install-strip && make install-man 1.9 Install qmailadmin
[root@server02 maildrop-1.6.3]# cd /downloads/qmailrocks [root@server02 qmailrocks]# tar zxvf qmailadmin-1.2.9.tar.gz [root@server02 qmailrocks]# cd qmailadmin-1.2.9 Sesuaikan dengan letak cgi dir Anda dan documentRoot: [root@server02 qmailadmin-1.2.9]# ./configure --enable-cgibindir=/home/htdocs/cgi-bin htmldir=/home/htdocs/www [root@server02 qmailadmin-1.2.9]# make && make install-strip 1.9 Finishing....... [root@server02 qmailadmin-1.2.9]# /downloads/qmailrocks/scripts/finalize/linux/finalize_linux.script Ubah isi file menyesusaikan domain Anda (pada file diset devault mail.example.com: [root@server02 qmailadmin-1.2.9]# vi /var/qmail/supervise/qmail-pop3d/run [root@server02 qmailadmin-1.2.9]# vi /var/qmail/supervise/qmail-smtpd/run Lanjutkan dengan: [root@server02 [root@server02 [root@server02 [root@server02 [root@server02 [root@server02 [root@server02 [root@server02
qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]# qmailadmin-1.2.9]#
qmailctl stop echo '127.:allow,RELAYCLIENT=""' >> /etc/tcp.smtp qmailctl cdb echo
[email protected] > /var/qmail/alias/.qmail-root echo
[email protected] > /var/qmail/alias/.qmail-postmaster echo
[email protected] > /var/qmail/alias/.qmail-mailer-daemon ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymous chmod 644 /var/qmail/alias/.qmail*
Anda bisa kunjungi dengan browser di http://domain.anda/cgi-bin/qmailadmin
–enable-
1.10 Uninstall sendmail Unintall sendmail Anda, cek dengan: rpm -qa|grep sendmail Semua yang muncul di uninstall. 1.11 Cek intalasi [root@server02 qmailadmin-1.2.9]# /downloads/qmailrocks/scripts/util/qmr_inst_check Congratulations, your Qmailrocks.org Qmail installation looks good! 1.12 Jalankan qmail [root@server02 qmailadmin-1.2.9]# qmailctl start Starting qmail... Starting qmail-send Starting qmail-smtpd Starting qmail-pop3d Gunakan program client: