Wednesday, August 13, 2008

DNS di Linux ( versi sederhana )

Langkah - Langkah yang harus dilakukan :

#urpmi bind

Lalu edit file konfigurasi /etc/named.conf

tambahkan ini dibaris terakhir

zone "linuxindo.tux" IN {
type master;
file "db.linuxindo.tux";
};

// kalau mau tambah infolinux.tux maka buat file seperti di atas satu lagi
// IP yang disini bisa kita masukin IP dari ISP atau yang kita beli

zone "5.168.192.in-addr.arpa" IN {
type master;
file "db.192.168.5";
};


untuk zone di hint itu ada lah root server

[root@localhost student]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:8F:CE:44:21
inet addr:192.168.5.165 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::213:8fff:fece:4421/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17379 errors:0 dropped:0 overruns:0 frame:0
TX packets:13844 errors:0 dropped:0 overruns:0 carrier:0
collisions:399 txqueuelen:1000
RX bytes:15959945 (15.2 MiB) TX bytes:2294445 (2.1 MiB)
Interrupt:21 Base address:0xec00

langkah selanjutnya adalah

[root@localhost student]# cd /var/lib/named/var/named --> direktori tempat named.ca berada ( root server )
[root@localhost named]# ls
master/ named.ca reverse/ slaves/

[root@localhost named]# vi named.ca

isinya kurang lebih seperti ini :
;
;
; formerly NS.INTERNIC.NET
;
; $Id: bind-named.root 80849 2007-09-06 11:56:48Z oden $
; $HeadURL: svn+ssh://svn.mandriva.com/svn/packages/cooker/bind/current/SOURCES/
bind-named.root $
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
;
; formerly C.PSI.NET


[root@localhost named]# ls master
localdomain.zone localhost.zone

kita copy saja file localhost.zone menjadi db.inuxindo.tux dengan syntax seperti dibawah ini di direktori named:

[root@localhost named]# cp master/localhost.zone db.linuxindo.tux

[root@localhost named]# vi db.linuxindo.tux
1d = 86400 detik
ns yang di atas dan di bawah harus sama

$TTL 1d
@ IN SOA ns.linuxindo.tux. admin.linuxindo.tux. (
2008081201 ; serial (d. adams) tiap ada revisi ganti
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum update

IN NS ns.linuxindo.tux. // ada @atau tidak tidak ngaruh
IN NS ns2.linuxindo.tux.
IN MX 10 mail.linuxindo.tux. // mail server, angka = priority
IN MX 5 mail2.linuxindo.tux. // harus beda jika ingin tambahkan 1 domain lagi misal infolinux.tux buat file db.infolinux.tux satu lagi
IN A 192.168.5.165 // harus di rata kiri
ns IN A 192.168.5.165
ns2 IN A 192.168.5.166 // kalau A ke IP sedang cname ke name
mail IN A 192.168.5.165
mail2 IN A 192.168.5.166
www IN CNAME mail.linuxindo.tux.
webmail IN CNAME mail.linuxindo.tux.

[root@localhost named]# cp db.linuxindo.tux db.192.168.5 // copy ke file yang lain

[root@localhost named]# vi db.192.168.5
$TTL 1d
@ IN SOA ns.linuxindo.tux. admin.linuxindo.tux. (
2008081200 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ IN NS ns.linuxindo.tux.
@ IN NS ns2.linuxindo.tux. // sama sampai dengan ini lalu kita
tambah file di bawah ini
165 IN PTR mail.linuxindo.tux. // pake mail karena kita akan membuat server mail
166 IN PTR mail2.linuxindo.tux.


[root@localhost named]# service named start
Starting named: [ OK ]

[root@localhost named]# cd ../log

[root@localhost log]# ls
default.log query.log update.log xfer-out.log
notify.log security.log xfer-in.log

[root@localhost log]# tail -f default.log // check error

Tambahkan
vi /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.5.165 // ip kita atau ip server yang dituju
search linuxindo.tux
// nanti begitu kita tambah host webmail maka akan ditambahkan ke linuxindo.tux
~

Lalu namednya direstart lagi

UTILITAS DNS

[root@localhost student]# host linuxindo.com // mempunyai Ip yang sama
linuxindo.com has address 202.43.162.29
linuxindo.com mail is handled by 10 mail.linuxindo.com.

[root@localhost student]# host infolinux.web.id
infolinux.web.id has address 202.43.162.29
infolinux.web.id mail is handled by 10 mail.infolinux.web.id.

[root@localhost student]# host www.linuxindo.tux // apa aja yang aktif
www.linuxindo.tux is an alias for mail.linuxindo.tux.
mail.linuxindo.tux has address 192.168.5.165
mail.linuxindo.tux has address 192.168.5.166

[root@localhost student]# host mail.linuxindo.tux
mail.linuxindo.tux has address 192.168.5.166
mail.linuxindo.tux has address 192.168.5.165
// contoh di atas salah, mail.linuxindo.tux tidak boleh mengaju ke 2 IP, yang benar dibawah

[root@localhost student]# host mail.linuxindo.tux
mail.linuxindo.tux has address 192.168.5.165

[root@localhost student]# host www.linuxindo.tux
www.linuxindo.tux is an alias for mail.linuxindo.tux.
mail.linuxindo.tux has address 192.168.5.165

[root@localhost student]# host mail2.linuxindo.tux
mail2.linuxindo.tux has address 192.168.5.166

[root@localhost student]# host -t mx linuxindo.tux // ada berapa server yang aktif
linuxindo.tux mail is handled by 5 mail2.linuxindo.tux. // prioritas pertama
linuxindo.tux mail is handled by 10 mail.linuxindo.tux.

[root@localhost student]# host webmail // fungsi search di /etc/resolv.conf
Host webmail not found: 3(NXDOMAIN)

[root@localhost student]# host www
www.linuxindo.tux is an alias for mail.linuxindo.tux.
mail.linuxindo.tux has address 192.168.5.165

[root@localhost student]# host -t mx linuxindo.com
linuxindo.com mail is handled by 10 mail.linuxindo.com.

[root@localhost student]# host -t mx google.com
google.com mail is handled by 10 smtp1.google.com.
google.com mail is handled by 10 smtp2.google.com.
google.com mail is handled by 10 smtp3.google.com.
google.com mail is handled by 10 smtp4.google.com.

[root@localhost student]# host -t mx google.co.id
google.co.id mail is handled by 10 smtp2.google.com.
google.co.id mail is handled by 10 smtp3.google.com.
google.co.id mail is handled by 10 smtp4.google.com.
google.co.id mail is handled by 10 smtp1.google.com.

[root@localhost student]# host -t mx google.com
google.com mail is handled by 10 smtp4.google.com.
google.com mail is handled by 10 smtp1.google.com.
google.com mail is handled by 10 smtp2.google.com.
google.com mail is handled by 10 smtp3.google.com.

[root@localhost student]# host -t mx yahoo.com
yahoo.com mail is handled by 1 f.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 g.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 a.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 b.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 c.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 d.mx.mail.yahoo.com.
yahoo.com mail is handled by 1 e.mx.mail.yahoo.com.

[root@localhost student]# host -t mx matapel.com
matapel.com mail is handled by 10 mail.matapel.com.

[root@localhost student]# host -t mx linuxindo.tux
linuxindo.tux mail is handled by 5 mail2.linuxindo.tux.
linuxindo.tux mail is handled by 10 mail.linuxindo.tux.

[root@localhost student]# host linuxindo.tux
linuxindo.tux has address 192.168.5.165
linuxindo.tux mail is handled by 10 mail.linuxindo.tux.
linuxindo.tux mail is handled by 5 mail2.linuxindo.tux.

[root@localhost student]# host mail.linuxindo.tux
mail.linuxindo.tux has address 192.168.5.165

[root@localhost student]# host -t mx cbn.net.id
cbn.net.id mail is handled by 20 mx.cbn.net.id.


[root@localhost student]# host e.mx.mail.yahoo.com
e.mx.mail.yahoo.com has address 216.39.53.1
e.mx.mail.yahoo.com mail is handled by 0 .

[root@localhost student]# host f.mx.mail.yahoo.com
f.mx.mail.yahoo.com has address 68.142.202.247
f.mx.mail.yahoo.com has address 209.191.88.247
f.mx.mail.yahoo.com mail is handled by 0 .

[root@localhost student]#

contoh jika buat infolinux.tux dicopy dari linuxindo.tux

[root@localhost named]# vi db.infolinux.tux

$TTL 1d
@ IN SOA ns.infolinux.tux. admin.infolinux.tux. ( //perhatikan titik
2008081200 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

IN NS ns.infolinux.tux.

IN MX 10 mail.infolinux.tux.

IN A 192.168.5.1 // jika tanpa www
ns IN A 192.168.5.165

mail IN A 192.168.5.165
www IN A 192.168.5.1 // jika Ip nya beda
webma1l IN CNAME mail.linuxindo.tux.
smtp IN CNAME mail.linuxindo.tux.
~
~
~

[root@localhost student]# host infolinux.tux
infolinux.tux has address 192.168.5.1
infolinux.tux mail is handled by 10 mail.infolinux.tux.

[root@localhost student]# host www.infolinux.tux
www.infolinux.tux has address 192.168.5.1



IP (192.168.5.165 ) mempunyai 2 domain yaitu infolinux.tux dan linuxindo.tux
[root@localhost student]# host infolinux.tux
infolinux.tux has address 192.168.5.165
infolinux.tux mail is handled by 5 mail2.infolinux.tux.
infolinux.tux mail is handled by 10 mail.infolinux.tux.

[root@localhost student]# host linuxindo.tux
linuxindo.tux has address 192.168.5.165
linuxindo.tux mail is handled by 5 mail2.linuxindo.tux.
linuxindo.tux mail is handled by 10 mail.linuxindo.tux.

[root@localhost student]# host www
www.linuxindo.tux is an alias for mail.linuxindo.tux.
mail.linuxindo.tux has address 192.168.5.165


End of Session 1 ( ok )

===========================================================
SESI ke 2 / Qmail
===========================================================

pertama-tama gcc dulu jika tidak ada install gcc dengan
#urpmi gcc

Persiapan !!!
create user-user untuk qmail
# groupadd nofiles
# groupadd vchkpw
# mkdir /var/qmail
# useradd -g nofiles -d /var/qmail/alias alias
# useradd -g nofiles -d /var/qmail qmaild
# useradd -g nofiles -d /var/qmail qmaill
# useradd -g nofiles -d /var/qmail qmailp
# groupadd qmail
# useradd -g qmail -d /var/qmail qmailq
# useradd -g qmail -d /var/qmail qmailr
# useradd -g qmail -d /var/qmail qmails
# useradd -g vchkpw -u 89 vpopmail
-- buat satu2

1.Buat direktori src
# mkdir -p /usr/local/src
download semua file tersebut di atas lalu copy kan ke direktori /usr/local/src
# cd /usr/local/src
# tar -zxvf qmail-1.03.tar.gz
# tar -zxvf ucspi-tcp-0.88.tar.gz
# tar -zxvf vpopmail-5.4.13.tar.gz


2.Buat symlink direktori /usr/share/man ke /var/qmail
# ln -s /usr/share/man /var/qmail/man


3.Compile Qmail dan membuat qmail basic configuration
# cd /usr/local/src/qmail-1.03
# patch < ../qmail-1.03.errno.patch
# make setup check

[root@localhost qmail-1.03]# ./config-fast mail.linuxindo.tux
// sesuai nama mail server
Your fully qualified host name is mail.linuxindo.tux.
Putting mail.linuxindo.tux into control/me...
Putting linuxindo.tux into control/defaultdomain...
Putting linuxindo.tux into control/plusdomain...
Putting mail.linuxindo.tux into control/locals...
Putting mail.linuxindo.tux into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to mail.linuxindo.tux.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!

[root@localhost qmail-1.03]# cd ../ucspi-tcp-0.88
[root@localhost ucspi-tcp-0.88]# vi conf-cc
gcc -O2 -include /usr/include/errno.h

[root@localhost ucspi-tcp-0.88]# make
# make setup check

Langkah ke 5
[root@localhost ucspi-tcp-0.88]# mkdir /package

[root@localhost ucspi-tcp-0.88]# cp /usr/local/src/daemontools-0.76.tar.gz /package

[root@localhost ucspi-tcp-0.88]# cd /package

[root@localhost package]# tar -zxvf daemontools-0.76.tar.gz

[root@localhost package]# cd admin/daemontools-0.76/src

[root@localhost src]# patch < /usr/local/src/daemontools-0.76.errno.patch
patching file error.h

[root@localhost src]# cd ..

[root@localhost daemontools-0.76]# package/install
Linking ./src/* into ./compile...
Compiling everything in ./compile...
init should start svscan now.


[root@localhost daemontools-0.76]# ps aux | grep svscan
root 10271 0.0 0.2 2372 1096 ? Ss 13:50 0:00 /bin/sh /command/svscanboot
root 10273 0.0 0.0 1664 360 ? S 13:50 0:00 svscan /service
root 10276 0.0 0.1 3072 728 pts/4 S+ 13:50 0:00 grep --color svscan

[root@localhost daemontools-0.76]# cp /var/qmail/boot/home /var/qmail/rc

[root@localhost daemontools-0.76]# vi /var/qmail/rc
copy isi yang ada di script yang diberikan linuxindo

[root@localhost daemontools-0.76]# chmod 755 /var/qmail/rc
[root@localhost daemontools-0.76]# vi /var/qmail/bin/qmailctl
[root@localhost daemontools-0.76]# chmod 755 /var/qmail/bin/qmailctl
[root@localhost daemontools-0.76]# ln -s /var/qmail/bin/qmailctl /usr/local/sbin
[root@localhost daemontools-0.76]# ln -s /var/qmail/bin/qmailctl /etc/rc.d/init.d/qmail

[root@localhost daemontools-0.76]# chkconfig --level 2345 qmail on // langkah cepat
pada langkah ke 8

[root@localhost daemontools-0.76]# mkdir -p /var/qmail/supervise/qmail-send/log
[root@localhost daemontools-0.76]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
[root@localhost daemontools-0.76]# chmod +t /var/qmail/supervise/qmail-send
[root@localhost daemontools-0.76]# chmod +t /var/qmail/supervise/qmail-smtpd
[root@localhost daemontools-0.76]# vi /var/qmail/supervise/qmail-send/log/run
[root@localhost daemontools-0.76]# chmod 755 /var/qmail/supervise/qmail-send/log/run
[root@localhost daemontools-0.76]# vi /var/qmail/supervise/qmail-send/run
[root@localhost daemontools-0.76]# chmod 755 /var/qmail/supervise/qmail-send/run
[root@localhost daemontools-0.76]# echo 20 > /var/qmail/control/concurrencyincoming
[root@localhost daemontools-0.76]# chmod 644 /var/qmail/control/concurrencyincoming
[root@localhost daemontools-0.76]# vi /var/qmail/supervise/qmail-smtpd/run
[root@localhost daemontools-0.76]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
[root@localhost daemontools-0.76]# vi /var/qmail/supervise/qmail-smtpd/log/run
[root@localhost daemontools-0.76]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
[root@localhost daemontools-0.76]# mkdir -p /var/log/qmail/smtpd
[root@localhost daemontools-0.76]# chown -R qmaill /var/log/qmail

langkah ke 15.
[root@localhost daemontools-0.76]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service

[root@localhost daemontools-0.76]# echo '127.:allow,RELAYCLIENT=""' > /etc/tcp.smtp

[root@localhost daemontools-0.76]#qmailctl cdb
Reloaded /etc/tcp.smtp.
Reloaded /etc/tcp.pop3.

[root@localhost daemontools-0.76]# urpmi telnet
Package telnet-client-krb5-1.6.2-7mdv2008.0.i586 is already installed

[root@localhost daemontools-0.76]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
220 mail.linuxindo.tux ESMTP
^] ( untuk keluar gunakan kontrol ]
telnet> quit
Connection closed.

INSTALASI VPOPMAIL
[root@localhost daemontools-0.76]# mkdir -p /home/vpopmail
[root@localhost daemontools-0.76]# chown -R vpopmail.vchkpw /home/vpopmail
[root@localhost daemontools-0.76]# cd /usr/local/src/vpopmail-5.4.13

[root@localhost vpopmail-5.4.13]# ./configure --enable-tcprules-prog=/usr/local/bin/tcprules --enable-tcpserver-file=/etc/tcp.smtp --enable-roaming-users=y --enable-relay-clear-minutes=60

# make install-strip

[root@localhost vpopmail-5.4.13]# mkdir -p /var/qmail/supervise/qmail-pop3d/log
[root@localhost vpopmail-5.4.13]# vi /var/qmail/supervise/qmail-pop3d/run
[root@localhost vpopmail-5.4.13]# chmod 755 /var/qmail/supervise/qmail-pop3d/run

[root@localhost vpopmail-5.4.13]# vi /var/qmail/supervise/qmail-pop3d/log/run
[root@localhost vpopmail-5.4.13]# chmod 755 /var/qmail/supervise/qmail-pop3d/log/run

langkah ke 20
[root@localhost vpopmail-5.4.13]# echo 20 > /var/qmail/control/concurrencypop3
[root@localhost vpopmail-5.4.13]# vi /etc/tcp.pop3
[root@localhost vpopmail-5.4.13]# chmod +t /var/qmail/supervise/qmail-pop3d
[root@localhost vpopmail-5.4.13]# mkdir -p /var/log/qmail/pop3d
[root@localhost vpopmail-5.4.13]# chown qmaill /var/log/qmail/pop3d
[root@localhost vpopmail-5.4.13]# ln -s /var/qmail/supervise/qmail-pop3d /service
[root@localhost vpopmail-5.4.13]# crontab -e
40 * * * * /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null
masukan di atas

[root@localhost vpopmail-5.4.13]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
+OK <12906.1218650852@FQDN> // berati masih salah dalam hal ini harus mail.linuxindo.tux
^]
telnet> quit
Connection closed.

edit disini /// terjadi kesalahan disini
[root@localhost vpopmail-5.4.13]# vi /var/qmail/supervise/qmail-pop3d/run

[root@localhost vpopmail-5.4.13]# service qmail restart
Restarting qmail:
* Stopping qmail-smtpd.
* Sending qmail-send SIGTERM and restarting.
* Restarting qmail-smtpd.
* Restarting qmail-pop3d.

[root@localhost vpopmail-5.4.13]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
+OK <12929.1218650969@mail.linuxindo.tux>
^]
telnet> quit
Connection closed.

Langkah ke 23
[root@localhost vpopmail-5.4.13]# /home/vpopmail/bin/vadddomain linuxindo.tux
Please enter password for postmaster:
enter password again:
[root@localhost vpopmail-5.4.13]# /home/vpopmail/bin/vadduser andi@linuxindo.tux
Please enter password for andi@linuxindo.tux:
enter password again:
[root@localhost vpopmail-5.4.13]# /home/vpopmail/bin/vadduser henry@linuxindo.tux
Please enter password for henry@linuxindo.tux:
enter password again:
[root@localhost vpopmail-5.4.13]# ln -s /var/qmail/bin/sendmail /usr/sbin
[root@localhost vpopmail-5.4.13]# mail andi@linuxindo.tux
Subject: test
tetresdrwerwerewrwer
werewrwe
rwewe
.
EOT
[root@localhost vpopmail-5.4.13]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
+OK <12944.1218651192@mail.linuxindo.tux>
user andi@linuxindo.tux // diketik biasa user lalu andi@matapel.linux
+OK
pass
-ERR syntax error
pass andi
+OK
list
+OK
1 482
.
retr
-ERR syntax error
retr 1
+OK
Return-Path:
Delivered-To: andi@linuxindo.tux
Received: (qmail 12940 invoked by uid 0); 13 Aug 2008 18:12:58 -0000
Message-ID: <20080813181258.12939.qmail@mail.linuxindo.tux>
From: student@mail.linuxindo.tux
Date: Wed, 13 Aug 2008 14:12:58 -0400
To: andi@linuxindo.tux
Subject: test
User-Agent: Heirloom mailx 12.3 7/15/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

tetresdrwerwerewrwer
werewrwe
rwewe

.
quit
+OK
Connection closed by foreign host.

Langkah ke 25
[root@localhost vpopmail-5.4.13]# cd /usr/local/src

install squirrelmail
[root@localhost src]# urpmi libgdbm-devel

http://192.168.5.2/Mandrake/2008/i586/media/main/libgdbm-devel-1.8.3-5mdv2008.0.i586.rpm
installing libgdbm-devel-1.8.3-5mdv2008.0.i586.rpm from /var/cache/urpmi/rpms
Preparing... #############################################
1/1: libgdbm-devel #############################################

[root@localhost src]# tar -jxvf courier-authlib-0.55.tar.bz2

[root@localhost src]# cd courier-authlib-0.55

[root@localhost courier-authlib-0.55]#./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkp --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat

[root@localhost courier-authlib-0.55]# make && make check

[root@localhost courier-authlib-0.55]# make install-strip && make install-configure

[root@localhost courier-authlib-0.55]# vi /etc/rc.local
/usr/local/sbin/authdaemond start

[root@localhost courier-authlib-0.55]# cd ..

[root@localhost src]# tar -jxvf courier-imap-4.0.2.tar.bz2

[root@localhost src]# chown -R student:wheel courier-imap-4.0.2

[root@localhost src]# cd courier-imap-4.0.2

[root@localhost courier-imap-4.0.2]# su student

[student@localhost courier-imap-4.0.2]$. /configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat

[student@localhost courier-imap-4.0.2]$ make && make check


[student@localhost courier-imap-4.0.2]$ exit
exit
[root@localhost courier-imap-4.0.2]# make install-strip && make install-configure

# vi /usr/local/etc/imapd.cnf
ubah postmaser@example.com sesusai dengan email anda, misalkan postmaster@zaidi.com
# vi /usr/local/etc/imapd
pastikan configurasi ini harus ada : IMAPDSTART=YES
# vi /usr/local/etc/authlib/authdaemonrc
pastikan setting authmodulelist hanya authvchkpw, seperti ini :
authmodulelist="authvchkpw"
# cp /usr/local/libexec/imapd.rc /etc/rc.d/init.d/imap
# cp /usr/local/libexec/imapd-ssl.rc /etc/rc.d/init.d/imaps
# /usr/local/sbin/authdaemond stop
# /usr/local/sbin/authdaemond start
# /etc/rc.d/init.d/imap stop
# /etc/rc.d/init.d/imaps stop
# /etc/rc.d/init.d/imap start
# /etc/rc.d/init.d/imaps start.

[root@localhost courier-imap-4.0.2]#
[root@localhost courier-imap-4.0.2]# cd /usr/local/src

[root@localhost courier-imap-4.0.2]# nmap localhost
bash: nmap: command not found nmap belum ada maka install dulu

[root@localhost courier-imap-4.0.2]# urpmi nmap

http://192.168.5.2/Mandrake/2008/i586/media/main/nmap-4.20-2mdv2008.0.i586.rpm
installing nmap-4.20-2mdv2008.0.i586.rpm from /var/cache/urpmi/rpms
Preparing... #############################################
1/1: nmap #############################################

[root@localhost courier-imap-4.0.2]# nmap localhost

Starting Nmap 4.20 ( http://insecure.org ) at 2008-08-13 15:05 EDT
Interesting ports on localhost (127.0.0.1):
Not shown: 1689 closed ports
PORT STATE SERVICE
25/tcp open smtp
53/tcp open domain
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
953/tcp open rndc
993/tcp open imaps
6000/tcp open X11

Nmap finished: 1 IP address (1 host up) scanned in 0.761 seconds

[root@localhost courier-imap-4.0.2]# cd /usr/local/src

[root@localhost src]# cp squirrelmail-1.4.10a.tar.bz2 /var/www/html

cp: cannot create regular file `/var/www/html': No such file or directory
[root@localhost src]# cd /var/www/html/
bash: cd: /var/www/html/: No such file or directory

[root@localhost src]# tar -jxvf squirrelmail-1.4.10a.tar.bz2

[root@localhost src]# mv squirrelmail-1.4.10a webmail

[root@localhost src]# cd webmail
[root@localhost webmail]# mkdir /var/sqattachements
[root@localhost webmail]# chown -R apache:apache /var/sqattachements
chown: `apache:apache': invalid user
[root@localhost webmail]# chown -R apache:apache data
chown: `apache:apache': invalid user
[root@localhost webmail]# cd config

Langkah ke 28
[root@localhost config]# urpmi apache apache-mod_php
// karena apache belum ada

kita ulang lagi
[root@localhost config]# cd /usr/local/src
[root@localhost src]# cp squirrelmail-1.4.10a.tar.bz2 /var/www/html
[root@localhost src]# cd /var/www/html/
[root@localhost html]# tar -jxvf squirrelmail-1.4.10a.tar.bz2
[root@localhost html]# mv squirrelmail-1.4.10a webmail
[root@localhost html]# cd webmail

[root@localhost webmail]# mkdir /var/sqattachements
mkdir: cannot create directory `/var/sqattachements': File exists
[root@localhost webmail]# chown -R apache:apache /var/sqattachements
[root@localhost webmail]# chown -R apache:apache data
[root@localhost webmail]# cd config

[root@localhost config]# ./conf.pl
SquirrelMail Configuration : Read: config_default.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 >> 2


SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : example.com // matapel.linux
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

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

Command >> A




SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

IMAP Settings
--------------
4. IMAP Server : localhost
5. IMAP Port : 143
6. Authentication type : login
7. Secure IMAP (TLS) : false
8. Server software : other
9. Delimiter : detect

B. Update SMTP Settings : localhost:25
H. Hide IMAP Server Settings

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

Command >> B

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : example.com // ganti jadi matapel.linux
2. Invert Time : false
3. Sendmail or SMTP : SMTP

SMTP Settings
-------------
4. SMTP Server : localhost
5. SMTP Port : 25
6. POP before SMTP : false
7. SMTP Authentication : none
8. Secure SMTP (TLS) : false
9. Header encryption key :

A. Update IMAP Settings : localhost:143 (other)
H. Hide SMTP Settings

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

Command >> R

SquirrelMail Configuration : Read: config_default.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


SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/local/squirrelmail/data/
2. Attachment Directory : /var/local/squirrelmail/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 :

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

Command >> s

Data saved in config.php
Press enter to continue...
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/local/squirrelmail/data/
2. Attachment Directory : /var/local/squirrelmail/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 :

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

Command >> q


Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!

[root@localhost config]# service httpd restart

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]

[root@localhost 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 >> 1


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name : SquirrelMail
2. Organization Logo : ../images/sm_logo.png
3. Org. Logo Width/Height : (308/111)
4. Organization Title : SquirrelMail $version
5. Signout Page :
6. Top Frame : _top
7. Provider link : http://www.squirrelmail.org/
8. Provider name : SquirrelMail

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

Command >> r





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 >> 2


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

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

Command >> 1

The domain name is the suffix at the end of all email addresses. If
for example, your email address is jdoe@example.com, then your domain
would be example.com.

[example.com]: linuxindo.tux
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : linuxindo.tux
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

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

Command >> s

Data saved in config.php
Press enter to continue...

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : linuxindo.tux
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

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

Command >> r




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


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/local/squirrelmail/data/
2. Attachment Directory : /var/local/squirrelmail/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 :

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.

[/var/local/squirrelmail/data/]: /var/www/html/webmail/data/
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/www/html/webmail/data/
2. Attachment Directory : /var/local/squirrelmail/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 :

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

Command >> 2

Path to directory used for storing attachments while a mail is
being sent. The path name can be absolute or relative (to the config directory).
It doesn't matter. Here are two examples:
Absolute: /var/spool/squirrelmail/attach/
Relative: ../attach/
Relative paths to directories outside of the SquirrelMail distribution
will be converted to their absolute path equivalents in config.php.

Note: There are a few security considerations regarding this
directory:
1. It should have the permission 733 (rwx-wx-wx) to make it
impossible for a random person with access to the webserver
to list files in this directory. Confidential data might
be laying around in there.
Depending on your user:group assignments, 730 (rwx-wx---)
may be possible, and more secure (e.g. root:apache)
2. Since the webserver is not able to list the files in the
content is also impossible for the webserver to delete files
lying around there for too long.
3. It should probably be another directory than the data
directory specified in option 3.

[/var/local/squirrelmail/attach/]: /var/sqattachements/
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/www/html/webmail/data/
2. Attachment Directory : /var/sqattachements/
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 :

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

Command >> s

Data saved in config.php
Press enter to continue...
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/www/html/webmail/data/
2. Attachment Directory : /var/sqattachements/
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 :

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

Command >> q


Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!

[root@localhost config]# service httpd restart
Shutting down httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]


================================================
selesai sampai disini coba http://localhost/webmail
Lihat topik qmail

=========================================================================
EOF

Tambahan
[root@localhost config]# df
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 7.7G 2.9G 4.5G 40% /
/dev/hda6 8.4G 202M 8.2G 3% /home
/dev/sda1 952M 15M 938M 2% /media/disk
[root@localhost config]# cd /home/student/qmail/
[root@localhost qmail]# ls
change_pass-2.7a-1.4.x.tar.gz qmail-1.03.errno.patch
courier-authlib-0.55.tar.bz2 qmail-1.03.tar.gz
courier-imap-4.0.2.tar.bz2 qmailhowto_squirrelmail.txt
courierpassd-1.1.0-RC1.tar.gz squirrelmail-1.4.10a.tar.bz2
daemontools-0.76.errno.patch ucspi-tcp-0.88.tar.gz
daemontools-0.76.tar.gz vpopmail-5.4.13.tar.gz
[root@localhost qmail]# cd ..
[root@localhost student]# cp qmail/ /media/disk/
Bumi/ dh/ xcode_magazine_3/ xcode_magazine_4/
[root@localhost student]# cp qmail/ /media/disk/
Bumi/ dh/ xcode_magazine_3/ xcode_magazine_4/
[root@localhost student]# cp qmail/ /media/disk/ -frv
`qmail/' -> `/media/disk/qmail'
`qmail/change_pass-2.7a-1.4.x.tar.gz' -> `/media/disk/qmail/change_pass-2.7a-1.4.x.tar.gz'
`qmail/qmail-1.03.tar.gz' -> `/media/disk/qmail/qmail-1.03.tar.gz'
`qmail/daemontools-0.76.tar.gz' -> `/media/disk/qmail/daemontools-0.76.tar.gz'
`qmail/courierpassd-1.1.0-RC1.tar.gz' -> `/media/disk/qmail/courierpassd-1.1.0-RC1.tar.gz'
`qmail/vpopmail-5.4.13.tar.gz' -> `/media/disk/qmail/vpopmail-5.4.13.tar.gz'
`qmail/qmail-1.03.errno.patch' -> `/media/disk/qmail/qmail-1.03.errno.patch'
`qmail/squirrelmail-1.4.10a.tar.bz2' -> `/media/disk/qmail/squirrelmail-1.4.10a.tar.bz2'
`qmail/qmailhowto_squirrelmail.txt' -> `/media/disk/qmail/qmailhowto_squirrelmail.txt'
`qmail/ucspi-tcp-0.88.tar.gz' -> `/media/disk/qmail/ucspi-tcp-0.88.tar.gz'
`qmail/courier-authlib-0.55.tar.bz2' -> `/media/disk/qmail/courier-authlib-0.55.tar.bz2'
`qmail/courier-imap-4.0.2.tar.bz2' -> `/media/disk/qmail/courier-imap-4.0.2.tar.bz2'
`qmail/daemontools-0.76.errno.patch' -> `/media/disk/qmail/daemontools-0.76.errno.patch'
[root@localhost student]# cd /media/disk/
[root@localhost disk]# ls -al
total 40
drwxr-xr-x 7 student root 4096 2008-08-13 15:26 ./
drwxr-xr-x 5 root root 4096 2008-08-13 14:30 ../
drwxr-xr-x 3 student root 8192 2008-08-11 22:09 Bumi/
drwxr-xr-x 4 student root 12288 2008-08-08 01:15 dh/
drwxr-xr-x 2 student root 4096 2008-08-13 15:26 qmail/
drwxr-xr-x 3 student root 4096 2008-08-08 00:28 xcode_magazine_3/
drwxr-xr-x 3 student root 4096 2008-08-08 00:28 xcode_magazine_4/
[root@localhost disk]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 7.7G 2.9G 4.5G 40% /
/dev/hda6 8.4G 202M 8.2G 3% /home
/dev/sda1 952M 21M 931M 3% /media/disk
[root@localhost disk]# cd qmail/
[root@localhost qmail]# ls
change_pass-2.7a-1.4.x.tar.gz* qmail-1.03.errno.patch*
courier-authlib-0.55.tar.bz2* qmail-1.03.tar.gz*
courier-imap-4.0.2.tar.bz2* qmailhowto_squirrelmail.txt*
courierpassd-1.1.0-RC1.tar.gz* squirrelmail-1.4.10a.tar.bz2*
daemontools-0.76.errno.patch* ucspi-tcp-0.88.tar.gz*
daemontools-0.76.tar.gz* vpopmail-5.4.13.tar.gz*
[root@localhost qmail]# cd ..
[root@localhost disk]# cd ..
[root@localhost media]# umo
umount umount.cifs3 umount.nfs
umount.cifs umount.hal umount.nfs4
[root@localhost media]# umount disk/
[root@localhost media]#

No comments:


Get cash from your website. Sign up as affiliate.

BISNIS PULSA via YM

APAKAH ANDA INGIN TERJUN KE BISNIS PULSA ONLINE??
Apakah pulsa isi ulang itu sebuah bisnis? Jawabnya bisa ya, bisa tidak. Bagi para distributor dan dealer, pulsa isi ulang adalah bisnis, namun bagi pengguna telepon seluler pada umunya, pulsa isi ulang adalah sebuah pengeluaran yang tidak bisa dihindari. Saya yakin, kita semua adalah pengguna telepon seluler, dan mempunyai beban pengeluaran untuk pembelian pulsa isi ulang atau pembayaran tagihan pulsa rutin setiap bulan. Melalui tulisan ini, saya akan mengajak Anda untuk merubah beban pengeluaran pulsa isi ulang sebagai sebuah bisnis.Sebuah peluang usaha yang tidak pernah diduga sebelumnya.
UBAH PULSA DARI BIAYA BULANAN MENJADI SUMBER UANG
Ingin mengetahui lebih lanjut silahkan klik gambar di bawah ini

Another PTC ( Paid to Click - Click and earn money ) Terpercaya





WordLinx - Get Paid To Click


INTERNET PAYMENT
Sign up for PayPal and start accepting credit card payments instantly.

Web Hosting Master web

PT. Master Web Network / MWN™ adalah perusahaan yang memfokuskan pada jasa webhosting, yang mencakup Domain Name, Shared Hosting, Colocation Server, Dedicated Server dan Managed Server. Pendiri Masterweb adalah pelaku Internet yang telah berpengalaman sejak 1995. Masterweb telah berkecimpung di bidang ISP sejak 1996 dan di bidang webhosting sejak 1998. Ingin hosting di masterweb, silahkan klik di sini