Instalasi Qmail, Vmailmgr, Omail Admin, Courier Imap, dan Squirrelmail pada Debian.

Posted: November 29, 2010 in Email, Ilmu Dunia, Mail Server

Semua yang saya tulis disini merupakan hasil dokumentasi dari hasil oprekan saya sendiri, semoga saja bisa bermanfaat bagi yang membacanya.

Jumat, 16 April 2010.

1. INSTALASI QMAIL
******************
FYI: semua source yang saya gunakan ini kebanyakan download dari packetnya qmailrock, jadi anda bisa download di qmailrocks.org

Stop MTA default debian
=========================
aji:/home/packets# /etc/init.d/exim4 stop
aji:/home/packets# update-rc.d -f exim4 remove

Download qmailqueue-patch, yang berguna sebagai add-on qmail agar bisa menjalankan external program, misalnya jika anda menginginkan software anti-virus serta quotas-patch, yang berguna untuk membounce email jika suatu user sistem sudah melebihi quota sistem, misalnya untuk pemberian quota perdomain dengan vmailmgr
===========================================================================================================================================================
aji:/home/packets# wget http://www.qmail.org/qmailqueue-patch
aji:/home/packets# wget http://www.qmail.org/qmail-1.03-quotas-1.1.patch

downloadnya dari sini :
=========================
[root@wedus src]# wget http://cr.yp.to/software/qmail-1.03.tar.gz
[root@wedus src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
[root@wedus src]# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
Extract
=======
aji:/home/packets# tar -xvf qmail-1.03.tar.gz
aji:/home/packets# tar -xvf daemontools-0.76.tar.gz
aji:/home/packets# tar -xvf ucspi-tcp-0.88.tar.gz

Buat direktori untuk qmail dan pembuatan account user yang akan menjalankan dan mengurusi email
===============================================================================================
aji:/home/packets# mkdir /var/qmail
aji:/home/packets# groupadd nofiles
aji:/home/packets# useradd -g nofiles -d /var/qmail/alias alias
aji:/home/packets# useradd -g nofiles -d /var/qmail/qmail qmaild
aji:/home/packets# useradd -g nofiles -d /var/qmail/qmail qmaill
aji:/home/packets# useradd -g nofiles -d /var/qmail/qmail qmailp
aji:/home/packets# groupadd qmail
aji:/home/packets# useradd -g qmail -d /var/qmail qmailq
aji:/home/packets# useradd -g qmail -d /var/qmail qmailr
aji:/home/packets# useradd -g qmail -d /var/qmail qmails

Patch qmail :
=============
Copy file qmail-1.03.errno.patch dari /home/packets/patches/ ke dalam direktori qmail
aji:/home/packets/patches# cp mail-1.03.errno.patch /home/packets/qmail-1.03

aji:/home/packets/qmail-1.03# patch -p1 < qmail-1.03.errno.patch
patching file cdb_seek.c
patching file dns.c
patching file error.3
patching file error.h

Jika diperlukan, patch qmail anda dengan queue patch dan quota patch :
=======================================================================
aji:/home/packets/qmail-1.03# patch -p1 < ../qmailqueue-patch
aji:/home/packets/qmail-1.03# patch -p1 dot-qmail.0
nroff -man qmail-command.8 > qmail-command.0
nroff -man tcp-environ.5 > tcp-environ.0
nroff -man maildir.5 > maildir.0
nroff -man mbox.5 > mbox.0
nroff -man addresses.5 > addresses.0
nroff -man envelopes.5 > envelopes.0
nroff -man forgeries.7 > forgeries.0
./install
./instcheck

Membuat file konfigurasi qmail, disini saya menggunakan domain aji.tuelegi.web.id
==============================================================
aji:/home/packets/qmail-1.03# ./config-fast aji.tuelegi.web.id
aji:/home/packets/qmail-1.03# cd ../ucspi-tcp-0.88

Patch ucspi-tcp:
================
copy dulu file patchnya ke dalam folder ucspi-tcp-0.88

aji:/home/packets/ucspi-tcp-0.88# cp /home/packets/patches/ucspi-tcp-0.88.errno.patch /home/packets/ucspi-tcp-0.88
aji:/home/packets/ucspi-tcp-0.88# patch -p1 < ucspi-tcp-0.88.errno.patch
patching file error.h

Kompile dan install ucspi-tcp
=============================
aji:/home/packets/ucspi-tcp-0.88# make setup check
….

..
.
./compile instcheck.c
./load instcheck hier.o auto_home.o unix.a byte.a
./install
./instcheck
aji:/home/packets/ucspi-tcp-0.88# cd ../admin/daemontools-0.76/

Patch daemontools
=================
seperti biasa, copy dulu patchnya daemon ke dalam folder daemontools-0.76
aji:/home/packets/admin/daemontools-0.76# cp /home/packets/patches/daemontools-0.76.errno.patch /home/packets/admin/daemontools-0.76/
aji:/home/packets/admin/daemontools-0.76# patch -p1 < daemontools-0.76.errno.patch
patching file src/error.h

Kompile dan install daemontools:
================================
aji:/home/packets/admin/daemontools-0.76# ./package/install

Jika ingin mengecek apakah daemontools sudah sukses diinstall apa belum, bisa gunakan perintah ps ax | grep read
aji:/home/packets/admin/daemontools-0.76# ps ax | grep read
2 ? S< 0:00 [kthreadd]
7397 ? S 0:00 readproctitle service errors: ………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….
7401 pts/0 S+ 0:00 grep read

Saya kurang suka dengan struktur penempatan atau symlink file dan direktori pada daemontools dan (menurut saya lho) cenderung amburadul, jadi direktori /command saya hapus kemudian diganti dengan direktori command dari source daemontools :
========================================================================================================================================================
aji:/home/packets/admin/daemontools-0.76# rm -rf /command/
aji:/home/packets/admin/daemontools-0.76# mv command/ /

setelah itu restart server, kemudian tes kembali dengan perintah ps ax | grep read.

aji:/home/packets/admin/daemontools-0.76# ps ax | grep read
2 ? S&1

Variabel MAXSMTPD bisa anda sesuaikan dengan kondisi kebutuhan dan beban mailserver anda. Jika anda menginginkan penolakan terhadap email yang datang dari mailserver yang open relay yang biasanya merupakan SPAM, anda bisa menggunakan rblsmtpd menjadi :

tcpserver -H -R -v -x /etc/tcp.smtp.cdb -c “$MAXSMTPD” -u “$QMAILDUID” -g “$NOFILESGID” \
0 25 rblsmtpd -r relays.ordb.org rblsmtpd -b qmail-smtpd 2>&1

dalam konfigurasi ini, saya menggunakan rblsmtpd.

untuk melihat log rblsmtpd, bisa dilihat di /var/log/qmail/smtpd/current

==================================
======Senin, 19 April 2010 =======
==================================

Buat file script supervise untuk menjalankan log qmail-smtpd :
===============================================================
aji:/# vi /var/qmail/supervise/qmail-smtpd/log/run
Isinya :

#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s1048576 /var/log/qmail/smtpd

Ubah direktori untuk menjadi file-file yang bisa dieksekusi :
=============================================================
aji:/# chmod 755 /var/qmail/supervise/qmail-send/run
aji:/# chmod 755 /var/qmail/supervise/qmail-send/log/run
aji:/# chmod 755 /var/qmail/supervise/qmail-smtpd/run
aji:/# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run

Buat direktori untuk log qmail-send dan qmail-smtpd:
====================================================
aji:/# mkdir -p /var/log/qmail/smtpd
aji:/# chown qmaill /var/log/qmail /var/log/qmail/smtpd

Mengijinkan localhost untuk menggunakan smtp:
=============================================
aji:/home/packets# echo ‘127.0.0.1:allow,RELAYCLIENT=””‘ > /etc/tcp.smtp

Mengatur IP/Network mana saja yang bisa menggunakan smtp server anda, jika misalnya anda menginginkan komputer di jaringan intranet anda dengan IP 10.10.2.11 bisa menggunakan smtp anda, maka :
==================================================================================================================================================
aji:/home/packets# echo ‘10.10.2.11:allow,RELAYCLIENT=””‘ >> /etc/tcp.smtp

Atau jika anda mengijinkan seluruh network anda, misalnya 10.10.2.0/24 maka :
===============================================================================
aji:/home/packets# echo ‘10.10.2.:allow,RELAYCLIENT=””‘ >> /etc/tcp.smtp

Jangan lupa, setiap selesai penambahan untuk selalu membuat database baru dengan :
==================================================================================
aji:/home/packets# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp .qmail-root
aji:/var/qmail/alias# echo panjias@tuelegi.web.id > .qmail-postmaster
aji:/var/qmail/alias# echo panjias@tuelegi.web.id > .qmail-mailer-daemon

Ganti panjias@tuelegi.web.id dengan email yang bertanggung jawab terhadap server email tersebut (anda?)

2. INSTALASI VmAILMGR
*********************

Donwload vmailmgr, ekstrak, dan kompilasi (dan mengepatch, jika gcc anda bermasalah) :
======================================================================================
aji:/home/packets# wget http://www.vmailmgr.org/current/vmailmgr-0.97.tar.gz
aji:/home/packets# tar -xvf vmailmgr-0.97.tar.gz
aji:/home/packets# cd vmailmgr-0.97
aji:/home/packets/vmailmgr-0.97# ./configure
….

..
.
config.status: creating scripts/Makefile
config.status: creating php/Makefile
config.status: creating python/Makefile
config.status: creating config.h
config.status: executing default-1 commands

aji:/home/packets/vmailmgr-0.97# make
aji:/home/packets/vmailmgr-0.97# make install

Buat direktori dan file script supervise untuk menjalankan qmail-pop3d (pop server) :
====================================================================================
aji:/# mkdir -p /var/qmail/supervise/qmail-pop3d
aji:/# vi /var/qmail/supervise/qmail-pop3d/run

Isinya :

#!/bin/sh
PATH=$PATH:/usr/local/bin:/var/qmail/bin
export PATH
MAXPOP3D=30
exec /usr/local/bin/softlimit -m 5000000 \
tcpserver -H -v -c “$MAXPOP3D” 0 110 qmail-popup aji.tuelegi.web.id checkvpw qmail-pop3d Maildir/ 2>&1

Silakan anda sesuaikan variabel MAXPOP3D dan hostname aji.tuelegi.web.id dengan konfigurasi yang sesuai dengan kondisi mail server anda.

Buat file script supervise untuk menjalankan log qmail-pop3d :
==============================================================
aji:/# mkdir -p /var/qmail/supervise/qmail-pop3d/log
aji:/# vi /var/qmail/supervise/qmail-pop3d/log/run

Isinya :

#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s1048576 /var/log/qmail/pop3d

Buat direktori log qmail-pop3d serta mengeset file script tersebut menjadi executable :
=======================================================================================
aji:/# mkdir /var/log/qmail/pop3d
aji:/# chown qmaill /var/log/qmail/pop3d
aji:/# chmod 755 /var/qmail/supervise/qmail-pop3d/run
aji:/# chmod 755 /var/qmail/supervise/qmail-pop3d/log/run

Akhirnya kita masukkan script supervise qmail-pop3d kedalam /service :
======================================================================
aji:/# ln -s /var/qmail/supervise/qmail-pop3d /service

Untuk memeriksa apakah servise pop3 server sudah bekerja :
==========================================================
aji:/# ps ax | grep tcpserver
2228 ? S 0:00 tcpserver -H -R -v -x /etc/tcp.smtp.cdb -c 30 -u 1003 -g 1002 0 25 rblsmtpd -r relays.ordb.org rblsmtpd -b qmail-smtpd
6145 ? S 0:00 tcpserver -H -v -c 30 0 110 qmail-popup aji.tuelegi.web.id checkvpw qmail-pop3d Maildir/
6161 pts/0 R+ 0:00 grep tcpserver

Untuk sekedar memastikan, anda bisa mencoba telnet ke localhost port 110 :
==========================================================================
aji:/# telnet localhost 110
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
+OK

Download script untuk menjalankan qmail, anda bisa download di http://www.lifewithqmail.org/qmailctl-script-dt70 namun anda harus menambahkan untuk start/stop daemon pop3d nya, atau alternatif lain script yang sudah ditambah start/stop daemon pop3d di http://imzupload.com/bd3a4n457x8v/qmailctl.html.
Letakkan file hasil download ke dalam direktori /home/packets/ dengan menggunakan winscp.

aji:/home/packets# mv qmailctl /var/qmail/bin/qmailctl
aji:/home/packets# chmod 755 /var/qmail/bin/qmailctl
aji:/home/packets# ln -s /var/qmail/bin/qmailctl /usr/bin

Kadang kita butuh akses ke wrapper sendmail (misalnya script cgi) atau mua yang menggunakan wrapper sendmail (mutt, pine dll), jadi kita lakukan symlink ke binari qmail untuk wrapper sendmail :
===========================================================================================================================================================
aji:/home/packets# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
aji:/home/packets# ln -s /var/qmail/bin/sendmail /usr/bin/sendmail

PERTAMBAHAN VIRTUAL DOMAIN DI VMAILMGR
**************************************

Disini misalnya kita membuat sebuah virtual domain selasalegi.com dengan user sistem yang menghandle adalah panji. Ingat password yang diberikan untuk user panji akan kita gunakan nanti dalam memanage domain selasalegi.com menggunakan omail-admin :
===========================================================================================================================================================
aji:/home/packets# adduser panji
aji:/home/packets# passwd panji
Enter new UNIX password:panji45
Retype new UNIX password:panji45
passwd: password updated successfully
aji:/home/packets# echo selasalegi.com >> /var/qmail/control/rcpthosts
aji:/home/packets# echo selasalegi.com:panji >> /var/qmail/control/virtualdomains

Jangan lupa mengirim sinyal HUP ke qmail-send agar membaca file konfigurasi yang baru :
=======================================================================================
aji:/home/packets# killall -HUP qmail-send

Kemudian kita ganti (su – ) ke user panji untuk mengeset direktori dan file-file yang dibutuhkan oleh vmailmgr untuk domain selasalegi.com :
============================================================================================================================================
aji:/home/packets# su – panji
panji@aji:~$ vsetup
vsetup: created users directory.
vsetup: wrote ‘.qmail-default’ file.
vsetup: added alias ‘mailer-daemon’
vsetup: added alias ‘postmaster’
vsetup: added alias ‘root’

Kita coba buat sebuah user name (account email)panjias@selasalegi.com :
=======================================================================
panji@aji:~$ vadduser panjias
Enter the user’s new password:
Please type it again for verification:
vadduser: user ‘panjias’ successfully added

test dengan telnet ke localhost
===============================

aji:~# telnet localhost 110
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
+OK
user panjias@selasalegi.com
+OK
pass
-ERR syntax error
pass panji45
checkvpw: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object: Cannot allocate memory
-ERR unable to write pipe
Connection closed by foreign host.

masih error kalau memasukkan password, jadi kita harus melakukan sedikit perubahan pada /var/qmail/supervise/qmail-pop3d/run
pada bagian :

#!/bin/sh
PATH=$PATH:/usr/local/bin:/var/qmail/bin
export PATH
MAXPOP3D=30
exec /usr/local/bin/softlimit -m 5000000 \ –> ditambahin 0 (nol) satu lagi jadi 50000000
tcpserver -H -v -c “$MAXPOP3D” 0 110 qmail-popup aji.tuelegi.web.id checkvpw qmail-pop3d Maildir/ 2>&1

aji:~# vi /var/qmail/supervise/qmail-pop3d/run

kemudian restart qmailnya dengan qmailctl
aji:~# qmailctl restart

lalu coba test lagi

aji:~# telnet localhost 110
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
+OK
user panjias@selasalegi.com
+OK
pass panji45
+OK
quit
+OK
Connection closed by foreign host.

Berhasil—-berhasil…hore (panji the explorer)

Disitu kita lihat email sudah masuk dengan sukses. Untuk melakukan penambahan virtual domain yang lain silakan mengulangi langkah-langkah diatas. Untuk perintah-perintah yang lain didalam vmailmgr anda bisa mencoba : vaddalias vadduser vaddusers vchattr vchforwards vdeluser vpasswd vpasswds vpopbull vrehash vsetup .

3. INSTALASI OMAIL ADMIN
************************

Omail admin dipakai untuk memanage account user pada suatu domain dengan menggunakan web. Membutuhkan suatu webserver, misalnya apache yang sudah dikonfigurasi dengan modul php. Omail admin membutuhkan paket ucspi-unix yang digunakan untuk authentikasi dan paket qmail-autoresponder. Disini saya menggunakan ucspi-unix.0.34.

aji:/home/packets# wget http://untroubled.org/ucspi-unix/archive/ucspi-unix-0.34.tar.gz
aji:/home/packets# tar -xvf ucspi-unix-0.34.tar.gz
aji:/home/packets/ucspi-unix-0.34# make
aji:/home/packets/ucspi-unix-0.34# make install

Buat direktori supervise untuk servis vmailmgrd :
=================================================
aji:~# mkdir -p /var/qmail/supervise/vmailmgrd/log

Buat file supervise untuk menjalankan log vmailmgrd :
=====================================================
aji:~# vi /var/qmail/supervise/vmailmgrd/log/run

isinya:

#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s1048576 /var/log/qmail/vmailmgrd

Buat file supervise untuk menjalankan vmailmgrd :
=================================================
aji:~# vi /var/qmail/supervise/vmailmgrd/run

isinya :

#!/bin/sh
exec /usr/local/bin/softlimit -m 9000000 /usr/bin/unixserver -v — /tmp/.vmailmgrd /usr/local/sbin/vmailmgrd -V 2>&1

Buat direktori supervise untuk log vmailmgrd dan mengubah setting file script menjadi executable :
==================================================================================================
aji:~# mkdir -p /var/log/qmail/vmailmgrd
aji:~# chown qmaill /var/log/qmail/vmailmgrd
aji:~# chmod 755 /var/qmail/supervise/vmailmgrd/log/run /var/qmail/supervise/vmailmgrd/run

Akhirnya kita masukkan servis vmailmgrd kedalam /service :
==========================================================
aji:~# ln -s /var/qmail/supervise/vmailmgrd/ /service/

Donwload paket omail-admin dan qmail-autoresponder, dilanjutkan kompilasi dan instalasi :
=========================================================================================
aji:/home/packets# wget http://sourceforge.net/projects/omail/files/oMail-admin/1.2/omail-admin-1.2rc1.tar.gz/download
aji:/home/packets# http://www.datahelper.com/download/misc/autorespond-2.0.5.tar.gz
aji:/home/packets# tar -xvf autorespond-2.0.5.tar.gz
aji:/home/packets# cd autorespond-2.0.5
aji:/home/packets/autorespond-2.0.5# make && make install
aji:/home/packets/autorespond-2.0.5# cp autorespond /usr/local/bin/
aji:/home/packets/autorespond-2.0.5# cd ..
aji:/home/packets# tar -xvf omail-admin-1.2rc1.tar.gz

Disini anda harus menentukan URL dimana omail-admin bisa diakses. Anda bisa melihat file konfigurasi apache anda (httpd.conf)dan mencari directive DocumentRoot. Kalau anda menggunakan apache dari paket debian, biasanya default DocumentRoot terdapat pada direktori /var/www/html. Disini saya contohkan domain saya adalah selasalegi.com dengan DocumentRoot di /var/www/omadmin/ :

aji:/home/packets# mv omail-admin-1.2rc1 /var/www/omadmin/

Edit file config.php dan ganti variabel $sysadmin_maildengan email yang bertanggung jawab terhadap omail-admin, misalnya $sysadmin_mail = “panjias@tuelegi.web.id”; :

Dan jika anda menginginkan default dari bahasanya adalah indonesia, ubah variabel $default_language :

$default_language = “id”;

sekarang saatnya mencoba

http://aji.tuelegi.web.id/omadmin

login dengan domain yang anda gunakan pada saat setingan diatas.

4. INSTALASI COURIER IMAP (to be continue)
******************************************

Courier Imap, sesuai dengan namanya adalah sebuah IMAP server, yaitu sebuah IMAP server yang mendukung format penyimpanan email dengan menggunakan format Maildir. Dalam hal ini kita menggunakan Courier Imap untuk backend dari webmail squirrelmail.

download courier-imap, extract sourcenya dan kompilasi :
========================================================

source courier-imap yang saya gunakan sudah ada didalam folder packets, tempat saya menyimpan source. Jadi tinggal extract saja

aji:/home/packets# tar -xvf courier-imap-3.0.8.tar.gz

aji:/home/packets/courier-imap-3.0.8# ./configure –enable-workarounds-for-imap-client-bugs –disable-root-check –without-authcram –without-authcustom –without-authldap –without-authpam –without-authpgsql –without-authuserdb –without-authdaemon –without-authmysql –without-authvchkpw –without-authshadow

Kita tidak membutuhkan module authentikasi yang lain (jika ada), selain authvmailmgr, jadi module dari courier-imap ya dihapus saja 🙂 :
=========================================================================================================================================
aji:/home/packets/courier-imap-3.0.8# rm -rf /usr/lib/courier-imap/libexec/authlib/*

Salin modul authvmailmgr dari source vmailmgr yang telah kita kompilasi diatas ke direktori modul authentikasi untuk imap servernya :
=====================================================================================================================================
aji:/home/packets/courier-imap-3.0.8# cp ../vmailmgr-0.97/authenticate/authvmailmgr /usr/lib/courier-imap/libexec/authlib/

Salin file konfigurasi standar dari courier-imap :
==================================================
aji:/home/packets/courier-imap-3.0.8# cp /usr/lib/courier-imap/etc/imapd.dist \
/usr/lib/courier-imap/etc/imapd
aji:/home/packets/courier-imap-3.0.8# cp /usr/lib/courier-imap/etc/imapd-ssl.dist \
/usr/lib/courier-imap/etc/imapd-ssl

Edit file /usr/lib/courier-imap/etc/imapd , karena courier imap ini hanya digunakan untuk webmail ganti pada baris ADDRESS=0 menjadi ADDRESS=127.0.0.1 . Jika webmail anda adalah webmail yang sibuk, anda bisa menaikkan variabel MAXDAEMONS dan MAXPERIP, yang terpenting adalah ganti pada AUTHMODULES=”authpwd” menjadi AUTHMODULES=”authvmailmgr”:
========================================================================================================================================================
aji:/home/packets/courier-imap-3.0.8# vi /usr/lib/courier-imap/etc/imapd

Start daemon courier-imap :
===========================
aji:/home/packets/courier-imap-3.0.8# /usr/lib/courier-imap/libexec/imapd.rc start

Anda bisa memeriksa apakah servise courier-imap anda sudah berjalan semestinya, kita gunakan perintah ps :
==========================================================================================================
aji:/home/packets/courier-imap-3.0.8# ps ax | grep imap
13994 pts/1 S+ 0:00 vi /usr/lib/courier-imap/etc/imapd
14003 pts/0 S+ 0:00 vi /usr/lib/courier-imap/etc/imapd
14021 ? S 0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlogger=/usr/lib/courier-imap/sbin/courierlogger -stderrloggername=imapd – maxprocs=40 -maxperip=4 -pid=/var/run/imapd.pid -nodnslookup -noidentlookup 143 /usr/lib/courier-imap/sbin/imaplogin /usr/lib/courier-imap/libexec/authlib/authv mailmgr /usr/lib/courier-imap/bin/imapd Maildir
14023 ? S 0:00 /usr/lib/courier-imap/sbin/courierlogger imapd
14025 pts/2 R+ 0:00 grep imap

Agar setiap reboot daemon courier-imap dijalankan secara otomatis :
===================================================================
aji:/home/packets/courier-imap-3.0.8# echo “/usr/lib/courier-imap/libexec/imapd.rc start” >> /etc/rc.local

supaya courier-imapnya otomatis jalan = vi /etc/rc.local –> pindahkan stop(0) nya di paling bawah tulisan.

5. INSTALASI SQuIRRELMAIL
*************************

Download dan ekstrak paket squirrelmail:
========================================
aji:/home/packets# wget http://sourceforge.net/projects/squirrelmail/files/stable/1.4.20/squirrelmail-1.4.20.tar.gz/download
aji:/home/packets# tar -xvf squirrelmail-1.4.20.tar.gz

Tentukan letak direktori squirrelmail, misalnya disini saya letakkan didirektori /var/www/webmail sehingga akan bisa diakses melalui http://aji.tuelegi.web.id/webmail
=================================================================================================================================
aji:/home/packets# mv squirrelmail-1.4.20 /var/www/webmail

Tentukan user dan group yang menjalankan proses apache :
========================================================

aji:/var/www# chown -R www-data:www-data /home/datamail/attach/

konfigurasi squirrelmail :
==========================
aji:/var/www# cd webmail/config
aji:/var/www/webmail/config#./conf.pl

=======================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> D –> enter
========================================================================

========================================================================
SquirrelMail Configuration : Read: config.php
———————————————————
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don’t work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.

Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington’s IMAP server
gmail = IMAP access to Google mail (Gmail) accounts

quit = Do not change anything
Command >> courier (ketik) –>enter
==========================================================================

==========================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 4 –> enter
============================================================================

Buat direktori untuk data2 squirrelmail:
========================================
aji:/var/www/webmail/config# mkdir /home/datamail
aji:/var/www/webmail/config# mkdir /home/datamail/data
aji:/var/www/webmail/config# mkdir /home/datamail/attach

Tentukan user dan groupnya:
===========================
aji:/var/www/webmail/config# chown -R www-data:www-data /home/datamail/data/
aji:/var/www/webmail/config# chown -R www-data:www-data /home/datamail/attach/

*) ketik 1, sesuaikan dengan path tempat dimana squirrelmail mengakses folder (bebas). Disini saya membuat direktori datamail, data, dan attach di dalam direktori /home/
======================================================================================================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
General Options
1. Data Directory : /home/datamail/data/
2. Attachment Directory : /home/datamail/attach/
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID
15. Location base :
16. Only secure cookies if poss. : true
17. Disable secure forms : false
18. Page referal requirement :

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 1

Specify the location for your data directory.
The path name can be absolute or relative (to the config directory).
You probably need to create this directory yourself. Here are two examples:
Absolute: /var/local/squirrelmail/data/
Relative: ../data/
Relative paths to directories outside of the SquirrelMail distribution
will be converted to their absolute path equivalents in config.php.

Note: There are potential security risks with having a writable directory
under the web server’s root directory (ex: /home/httpd/html).
For this reason, it is recommended to put the data directory
in an alternate location of your choice.

[/home/datamail/data/]: isikan sesuai kebutuhan [lihat *) ] –> enter

========================================================================================================================================================
ketik s –> enter

ketik 2, lakukan hal yang sama seperti diatas
==============================================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
General Options
1. Data Directory : /home/datamail/data/
2. Attachment Directory : /home/datamail/attach/
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID
15. Location base :
16. Only secure cookies if poss. : true
17. Disable secure forms : false
18. Page referal requirement :

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 2
===============================================================================================
ketik s –> enter

Ketik q –> enter

Buka squirrelmail dari browser kesayangan anda
==============================================
http://aji.tuelegi.web.id/webmail

sampai disini anda sudah bisa mengirim dan meneria email dengan lancar.
Demikian tutorial singkat ini saya buat, mudah-mudahan bisa bermanfaat.

referensi :
===========
http://www.layangan.com/asfik/writings/qmail-vmailmgr.html
http://qmailrocks.org/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s