Installasi dan Konfigurasi Mail Server Qmail di OpenSuse

qmail qmail adalah Mail Transfer Agent (MTA) yang bekerja untuk platform UNIX like.Untuk saling bertukar pesan (email) qmail menggunakan Simple Message Transfer Protocol (SMTP). Untuk mendapatkan source code qmail anda dapat mengunjungi official sitenya qmail yaitu di http://www.qmailrocks.org/downloads/qmailrocks.tar.gz atau di mirror sitenya, atau dapat juga di http://www.inter7.com.

Qmail memiliki banyak keunggulan dibandingkan dengan MTA lainnya. Oleh karena itu banyak server email di internet yang menggunakannya.

Berikut ini adalah step by step Installasi Mail server Qmail :

1). Install Daemontools

# umask 022

# mkdir -p /package

# chmod 1755 /package

# cd /admin/daemontools-0.76

daemontools-0.76]# patch -p1 < /usr/src/qmailrocks/patch/daemontools-0.76.errno.patch

daemontools-0.76]# ./package/install

Ganti direktori /command hasil install dengan yang ada di pake daemontools

daemontools-0.76]# rm -rf /command/

daemontools-0.76]# mv command/ /
Cek svscan

ps axf |grep svscan

6321 pts/43 S+ 0:00 \_ grep svscan

2713 ? Ss 0:00 /bin/sh /command/svscanboot

2715 ? S 0:00 \_ svscan /service

2). Install ucspi-tcp-0.88

# cd /ucspi-tcp-0.88

ucspi-tcp-0.88]# patch -p1 < /usr/src/qmailrocks/patch/ucspi-tcp-0.88.errno.patch

ucspi-tcp-0.88]# make && make setup check

3). Install Qmail

Buat user-user untuk qmail

# mkdir /var/qmail

# groupadd nofiles

# 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

# cd qmail-1.03

qmail-1.03]# patch -p1 < /usr/src/qmailrocks/patch/qmail-1.03.errno.patch

qmail-1.03]# patch -p1 < /usr/src/qmailrocks/patch/qmailqueue-patch

qmail-1.03]# patch -p1 < /usr/src/qmailrocks/patch/qmail-1.03-quotas-1.1.patc

qmail-1.03]# make setup check

Configure untuk domain cahpati.com

qmail-1.03]# ./config-fast linuxer.cahpati.com

Buat system alias:
# echo wahyu@cahpati.com > /var/qmail/alias/.qmail-root
# echo wahyu@cahpati.com > /var/qmail/alias/.qmail-postmaster
# echo wahyu@cahpati.com > /var/qmail/alias/.qmail-mailer-daemon
# chmod 644 /var/qmail/alias/.qmail-*

.Hentikan dan hapus MTA Sendmail yang telah terinstal sebelumnya:

# ps -ax |grep sendmail
# /etc/init.d/sendmail stop
# rpm -e –nodeps sendmail

# chkconfig –list | grep sendmail —-à untuk memastikan service sendmail off

# chkconfig –del sendmail
Ganti /usr/lib/sendmail yang ada dengan versi qmail :
# cp /var/qmail/bin/sendmail /usr/bin
# cp /var/qmail/bin/sendmail /usr/lib
# cp /var/qmail/bin/sedmail /usr/sbin
# cp /usr/sbin/sendmail /usr/sbin/sendmail.old

Set relayclient

Sebuah mail server dikatakan ‘open relay’ jika server tersebut meneruskan pesan e-mail

yang diterimanya tanpa melihat siapa pengirimnya. Hal ini tentu saja merugikan, karena

orang-orang tertentu bisa memanfaatkannya untuk tujuan tidak baik. Oleh karena itu mail

server harus diset hanya merelay IP tertentu. Buatlah file konfigurasi sebagai berikut :

#echo ‘127.0.0.:allow,RELAYCLIENT=””‘ >> /etc/tcp.smtp

#echo ‘192.168.7.:allow,RELAYCLIENT=””‘ >> /etc/tcp.smtp

Jangan lupa, mengubah file tcp.smtp menjadi format.cdb:

# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

Buatlah skrip untuk menjalankan qmail,skrip ini dapat Anda dapatkan di source qmailrock caranya :

# cd /usr/src/qmailrocks/scripts/finalize

# cp qmailctl /var/qmail/bin/qmailctl

# chmod 755 /var/qmail/bin/qmailctl

Buatlah link untuk menjalankan service qmail secara automatis ketika computer hidup

# ln -s /var/qmail/bin/qmailctl /etc/init.d/qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc0.d/K30qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc1.d/K30qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc2.d/S80qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc3.d/S80qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc4.d/S80qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc5.d/S80qmail

# ln -s /etc/init.d/qmail /etc/rc.d/rc6.d/K30qmail

Buat file qmail boot script
Copy file /var/qmail/boot/home menjadi /var/qmail/rc
# cp /var/qmail/boot/home /var/qmail/rc
Jika jenis mailbox yang akan digunakan adalah maildir, maka edit file
tersebut di atas dengan mengganti ./Mailbox menjadi ./Maildir/ dan hapus
splogger qmail. Dengan demikian isi /var/qmail/rc menjadi:

#!/bin/sh
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/Mailbox by default.

exec env – PATH=”/var/qmail/bin:$PATH” \
qmail-start ./Maildir/

vi /var/qmail/control/defaultdelivery

./Maildir/

Pastikan bahwa file /var/qmail/rc itu executable

# chmod 755 /var/qmail/rc

Buat Supervise untuk qmail-send , qmail-smtpd & qmail-pop3d untuk menjalankan service-service dari qmail :

# mkdir -p /var/qmail/supervise

# mkdir -p /var/qmail/supervise/qmail-send
# mkdir -p /var/qmail/supervise/qmail-smtpd

# mkdir -p /var/qmail/supervise/qmail-pop3d

# mkdir -p /var/qmail/supervise/qmail-send/log
# mkdir -p /var/qmail/supervise/qmail-smtpd/log

# mkdir -p /var/qmail/supervise/qmail-pop3d/log

qmail-send

# vi /var/qmail/supervise/qmail-send/run

Isinya :

#!/bin/sh

exec /var/qmail/rc

# vi /var/qmail/supervise/qmail-send/log/run

Isinya :

#!/bin/sh

exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s1048576 /var/log/qmail

qmail-smtpd

# vi /var/qmail/supervise/qmail-smtpd/run

#!/bin/sh

PATH=$PATH:/usr/local/bin:/var/qmail/bin

export PATH

QMAILDUID=`id -u qmaild`

NOFILESGID=`id -g qmaild`

MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

LOCAL=`head -1 /var/qmail/control/me`

if [ -z “$QMAILDUID” -o -z “$NOFILESGID” -o -z “$MAXSMTPD” -o -z “$LOCAL” ]; then

echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in

echo /var/qmail/supervise/qmail-smtpd/run

exit 1

fi

if [ ! -f /var/qmail/control/rcpthosts ]; then

echo “No /var/qmail/control/rcpthosts!”

echo “Refusing to start SMTP listener because it’ll create an open relay”

exit 1

fi

exec /usr/local/bin/softlimit -m 30000000 \

/usr/local/bin/tcpserver -v -R -l “$LOCAL” -x /etc/tcp.smtp.cdb -c “$MAXSMTPD” \

-u “$QMAILDUID” -g “$NOFILESGID” 0 smtp \

/var/qmail/bin/qmail-smtpd linuxer.cahpati.com \

/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1

Periksa file /var/qmail/control/concurrencyincoming ,jika belum ada buatlah dengan perintah

echo 50 > /var/qmail/control/concurrencyincoming

chmod 644 /var/qmail/control/concurrencyincoming

# 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

qmail-pop3d

# vi /var/qmail/supervise/qmail-pop3d/run

#!/bin/sh

PATH=$PATH:/usr/local/bin:/var/qmail/bin

export PATH

MAXPOP3D=30

exec /usr/local/bin/softlimit -m 40000000 \

tcpserver -H -v -c “$MAXPOP3D” 0 110 qmail-popup server.cahpati.com\ /home/vpopmail/bin/vchkpw qmail-pop3d Maildir 2>&1

# vi /var/qmail/supervise/qmail-pop3d/log/run

#!/bin/sh

exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s1048576 /var/log/qmail-pop3d

Rubah mode filenya :

# chmod 755 /var/qmail/supervise/qmail-send/run

# chmod 755 /var/qmail/supervise/qmail-send/log/run

# chmod 755 /var/qmail/supervise/qmail-smtpd/run

# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run

# chmod 755 /var/qmail/supervise/qmail-pop3d/run

# chmod 755 /var/qmail/supervise/qmail-pop3d/log/run

Buatlah direktori-direktori yang mencatat proses logging qmail

# mkdir -p /var/log/qmail

# mkdir -p /var/log/qmail-smtpd

# mkdir -p /var/log/qmail-pop3d

Kemuadian ubah owner dari direktori yang baru kita buat dengan perinntah :

# chown qmaill:nofiles /var/log/qmail*

Buat link ke /service

# ln -s /var/qmail/supervise/qmail-send /service/qmail-send

# ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd

# ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d

4). Install Vpopmail

# cd /usr/src/qmail

# tar -xzvf vpopmail-5.2.1.tar.gz

# cd vpopmail-5.2.1

# groupadd vchkpw

# useradd -g vchkpw vpopmail

vpopmail-5.2.1]# ./configure –enable-logging=p

vpopmail-5.2.1]# make && make install-strip

Buat domainnya

# cd /home/vpopmail/bin

# ./vadddomain cahpati.com

Please enter password for postmaster:

enter password again: 123456

user untuk domain tersebut

# ./vadduser wahyu@cahpati.com

Please enter password for wahyui@cahpati.com

enter password again: 123456

Menjalankan Qmail

Untuk menjalankan qmail. Ketikkan perintah berikut :

# /etc/init.d/qmail start

Untuk mematikan service, perintahnya :

# /etc/init.d/qmail stop

Cek proses apakah qmail sudah jalan :

# ps ax | grep qmail

7902 ? S 0:00 supervise qmail-send

7904 ? S 0:00 /usr/local/bin/multilog t s1048576 /var/log/qmail

7905 ? S 0:00 supervise qmail-smtpd

7906 ? S 0:00 tcpserver -H -R -v -x /etc/tcp.smtp.cdb -c 30 -u 502 -g 501 0 25 qmail-smtpd

7908 ? S 0:00 /usr/local/bin/multilog t s1048576 /var/log/qmail/smtpd

7909 ? S 0:00 qmail-send

7910 ? S 0:00 qmail-lspawn ./Maildir/

7911 ? S 0:00 qmail-rspawn

7912 ? S 0:00 qmail-clean

7916 pts/4 R+ 0:00 grep qmail

Selamat….. qmail sudah berjalan dengan baik.

# ps ax |grep read

9 ? S< 0:00 [kthread]

5595 ? S 0:00 readproctitle service errors: ………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….

18051 pts/2 R+ 0:00 grep read

Tes Pengiriman

Pengiriman Lokal

Lakukan pengiriman e-mail secara lokal. Kali ini cobalah kirim ke user root. Ketikan

perintah :

# echo to:root | /var/qmail/bin/qmail-inject

Tampilkan log nya dengan perintah :

# tail –f /var/log/qmail/current

@40000000487609f41a92641c new msg 1058505

@40000000487609f41a9292fc info msg 1058505: bytes 221 from <root@linuxer.cahpati.com> qp 6492 uid 0

@40000000487609f41ba4d5ec starting delivery 43: msg 1058505 to local root@linuxer.cahpati.com

@40000000487609f41ba5146c status: local 1/10 remote 0/20

@40000000487609f42f2b8dcc new msg 1059460

@40000000487609f42f2bc47c info msg 1059460: bytes 328 from <root@linuxer.cahpati.com> qp 6495 uid 500

@40000000487609f430424174 starting delivery 44: msg 1059460 to local cahpati.com-wahyu@cahpati.com

@40000000487609f430427824 status: local 2/10 remote 0/20

@40000000487609f430429b4c delivery 43: success: did_0+1+0/qp_6495/

@40000000487609f43042ba8c status: local 1/10 remote 0/20

@40000000487609f43042ddb4 end msg 1058505

@40000000487609f430d774c4 delivery 44: success: did_0+0+1/

@40000000487609f430d7ab74 status: local 0/10 remote 0/20

@40000000487609f430d7cab4 end msg 1059460

Jika tampil pesan seperti diatas berarti e- mail berhasil dikirimkan ke root.

Pengiriman Remote

Sekarang coba pengiriman secara remote.

# echo to:wahyu_endro85@yahoo.com | /var/qmail/bin/qmail-inject

Pengiriman Bounce

E-mail dikatakan bounce bila account user tidak terdaftar pada mail server tersebut.

E-mail akan dikirimkan kembali dengan pengirim sebagai MAILER-DAEMON

# echo to:wahyu | /var/qmail/bin/qmail-inject

5).Install Autorespond

# cd /usr/src/qmail

# tar xzvf autorespond-2.0.5.tar.gz

# cd autorespond-2.0.5

# make

# make install

6). Install Maildrop

# cd /usr/src/qmail

# tar xzvf maildrop-1.6.3.tar.gz

# cd maildrop-1.6.3

# ./configure –prefix=/usr/local –enable-maildrop-uid=root –enable-maildrop-gid=vchkpw –enable-maildirquota

# make && make install-strip && make install-man

7). Install Ezmlm

# cd /usr/src/qmail ==è paket tambahan

# tar -xzvf ezmlm-0.53.tar.gz

# tar -xzvf ezmlm-idx-0.40.tar.gz

# mv ezmlm-idx-0.40/* ezmlm-0.53/

# cd ezmlm-0.53

# patch < idx.patch

# patch -p1 < /usr/src/ezmlm/ezmlm-idx-0.53.400.unified_41.patch

# make

# make man

# make setup

/usr/local/bin ==è ezmlm

8). Instaall Vqadminn

# cd /usr/src/qmail

# tar xzvf vqadmin-2.3.6.tar.gz

# cd vqadminn-2.3.6

# ./configure –enable-htmldir=/var/www/html –enable-cgibindir=/var/www/cgi-bin

# make && make install-strip

Edit file httpd.conf

# /usr/local/apps/conf/httpd.conf

ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”

<Directory “/var/www/cgi-bin”>

AllowOverride None

Options None

Order allow,deny

Allow from all

</Directory>

<Directory “/var/www/cgi-bin/vqadmin”>

deny from all

Options ExecCGI

AllowOverride AuthConfig

Order deny,allow

</Directory>

Edit file htaccess vqadmin

# cd /var/www/cgi-bin/vqadmin/

# vi .htaccess

Isinya :

AuthType Basic

AuthUserFile /usr/local/apps/conf/vqadmin.passwd

AuthName vQadmin

require valid-user

satisfy any

# chown nobody .htaccess atau chown apache .htaccess

# chmod 644 .htaccess atau chmod u+rw .htaccess / chmod go+r .htaccess

# /usr/local/apps/bin htpasswd -bc atau c /usr/local/apps/conf/vqadmin.passwd admin 123456

# chmod 644 /usr/local/apps/conf/vqadmin.passwd

# /etc/init.d/apachectl start

Untuk memastikan apakah vqadmin sudah berjalan dengan baik Anda bisa mengetikan http://linuxer.cahpati.com/cgi-bin/vqadmin/vqadmin.cgi di web browser .

9). Install Qmailadmin

# cd /urs/src/qmail

# tar -xzvf qmailadmin-1.2.9.tar.gz

# cd qmailadmin-1.2.9

./configure –enable-htmldir=/var/www/html –enable-cgibindir=/var/www/cgi-bin –enable-ezmlm-mysql –enable-modify-quota –enable-imagedir=/usr/apache/htdocs/images/qmailadmin

–enable-autoresponden-bin=/usr/local/bin –enable-ezmlmdir=/usr/local/bin/ezmlm/ –enable-vpopmaildir=/home/vpopmail/ –enable-vpopuser=vpopmail

# make

# make install-strip

http://linuxer.cahpati.com/cgi-bin/qmailadmin

Catatan : Kalau qmailadmin gak bias di buka di browser

# chown vpopmail:vchkpw /var/www/cgi-bin/qmailadmin

# chmod 6755 /var/www/cgi-bin/qmailadmin

10).Install IMAP Server

# cd /urs/src/qmail

# tar -jxvf courier-authlib-0.55.tar.bz2

# cd courier-authlib-0.55

courier-authlib-0.55]# ./configure –prefix=/usr/local –exec-prefix=/usr/local –with-authvchkpw –without-authldap –without-authmysql –disable-root-check –with-authchangepwdir=/usr/local/libexec/authlib

courier-authlib-0.55]# make && make check

courier-authlib-0.55]# make install-strip && make install-configure

Edit vi /usr/local/etc/authlib/authdaemonrc

authmodulelist=”authvchkpw”

cp courier-authlib.sysvinit /etc/init.d/courier-authlib

chmod +x /etc/init.d/courier-authlib

cek courier-authlib

ps ax |grep authdaemon

/etc/init.d/courier-authlib start

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc0.d/K30courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc1.d/K30courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc2.d/S80courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc3.d/S80courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc4.d/S80courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc5.d/S80courier-authlib

ln -s /etc/init.d/courier-authlib /etc/rc.d/rc6.d/K30courier-authlib

# cd /urs/src/qmail

# tar -jxvf courier-imap-4.0.2.tar.bz2

qmail# chown -R wahyu.root courier-imap-4.0.2/

# su wahyu

courier-imap-4.0.2$ ./configure –prefix=/usr/local –exec-prefix=/usr/local –with-authvchkpw –without-authldap –without-authmysql –disable-root-check –with-authchangepwdir=/usr/local/libexec/authlib

courier-imap-4.0.2$ make && make check pakai make aja

courier-imap-4.0.2]$ su ~

Password: 123456

# make install-strip && make install-configure

Edit file-file yang diperlukan :

courier-imap-4.0.2# vi /usr/local/etc/imapd.cnf

Ganti postmaser@example.com menjadi postmaster@cahpati.com

courier-imap-4.0.2# vi /usr/local/etc/imapd

IMAPDSTART=YES

courier-imap-4.0.2# vi /usr/local/etc/imapd-ssl

IMAPDSSLSTART=YES

TLS_CERTFILE=/usr/local/share/imapd.pem

courier-imap-4.0.2]# cp /usr/local/libexec/imapd.rc /etc//init.d/imap

courier-imap-4.0.2]# cp /usr/local/libexec/imapd-ssl.rc /etc//init.d/imaps

courier-imap-4.0.2# /etc/init.d/imap start

courier-imap-4.0.2# /etc/init.d/imaps start

Buatlah link untuk menjalankan service IMAP secara automatis ketika computer hidup

ln -s /etc/init.d/courier-imap /etc/rc.d/rc0.d/K30courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc1.d/K30courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc2.d/S80courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc3.d/S80courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc4.d/S80courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc5.d/S80courier-imap

ln -s /etc/init.d/courier-imap /etc/rc.d/rc6.d/K30courier-imap

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc0.d/K30courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc1.d/K30courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc2.d/S80courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc3.d/S80courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc4.d/S80courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc5.d/S80courier-imaps

ln -s /etc/init.d/courier-imaps /etc/rc.d/rc6.d/K30courier-imaps

11). Installasi Squirrelmail

Download paket squirrelmail dari http://www.squirrelmail.org

# cd /urs/src

# tar -jxvf squirrelmail-1.4.9a.tar.gz

# mv squirrelmail-1.4.9a /var/www/html/sqmail

# mkdir /var/attach

# chown -R apache:apache /var/attach atau chown –R nobody:nobody /var/attach

# cd /var/www/html/sqmail/

# chown -R apache:apache data atau chown –R nobody:nobody data

# cd /var/www/html/webmail/config

config]# ./conf.pl

Pilih dan sesuaikan domain

Tambahan

1. Domain : 1.2.3.4 (Enter domain : cahpati.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

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

General Option Setting

1. Data Directory : /var/www/html/sqmail/data/ default nya ../data/

2. Attachment Directory : /var/attach/ default nya $data_dir

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 :

http://linuxer.cahpati.com/sqmail/

Setting Courier Passd untuk ganti password lewat webmail Squirrelmail

# cd /usr/src/qmail

#tar xzvf courierpassd-1.1.1.tar.gz

# courierpassd-1.1.1

# ./configure ./configure –with-couriersrc=/usr/src/qmailrocks/courier-imap-4.0.2

# make

# make install

Setelah itu install xinetd

rpm -ivh xinetd-2.3.13-45.i568.rpm

Buat file xinetd script untuk courierpassd :

vi /etc/xinetd.d/courierpassd
Masukkan informasi berikut kedalam file courierpassd
service courierpassd
{
port = 106
socket_type = stream
protocol = tcp
user = root
server = /usr/local/sbin/courierpassd
server_args = -s imap
wait = no
only_from = 127.0.0.1
instances = 4
disable = no
}

Tambahkan Courierpassd service ke file system services :
vi /etc/services
( di atas barispaling bawah tambahkan courierpassd 106/tcp for /etc/xinetd.d/courierpassd)
———————————————————————————–
com-bardac-dw 48556/udp com-bardac-dw
iqobject 48619/tcp iqobject
iqobject 48619/udp iqobject
courierpassd 106/tcp for /etc/xinetd.d/courierpassd
Restart xinetd
/etc/init.d/xinetd restart

Tambahkan plugin untuk SquirrelMail sehingga user yang menggunakan webmail dapat melakukan perubahan password melalui webmail SquirrelMail , terdapat di folder :/usr/local/apps/htdocs/sqmail/plugins
Kemudian download file plugin :
http://squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fchange_pass-2.7-1.4.x.tar.gz

Unpack file module yang sudah di download
tar zxvf change_pass-2.7-1.4.x.tar.gz
mv change_pass usr/local/apps/htdocs/sqmail/plugins

#cd /usr/local/apps/htdocs/sqmail/config

# ./config.pl

Pilih option untuk “plugins” , pilih modul changepass.

Login Squirrelmail tanpa domain

login.php

addHidden(‘just_logged_in’, ‘1’).

addHidden(‘dom’,’cahpati.com’),

riderect.php

/* get globals we me need */

$login_username=$login_username.”@”.$dom;

sqGetGlobalVar(‘login_username’, $login_username);

/* remove redundant spaces */

$login_username = trim($login_username).’@cahpati.com’; —-à coba tambah ini aja.

Restart Apache /etc/init.d/apachectl restart

12). Install Clamv

Buat user dan groups Clamav

# groupadd clamav
# useradd -g clamav -s /bin/false -c “Clam AntiVirus” clamav
atau useradd -g clamav -s /sbin/nologin

# cd /usr/src/qmailrocks

# tar xzvf clamav-0.87.tar.gz

# cd clamav-0.87

# ./configure –prefix=/usr –sysconfdir=/etc –disable-zlib-vcheck
# make
# make install

Edit /etc/clamd.conf

Hapus ‘Example’

Trus ko hilangkan saja tanda pagar di depan kata-kata :

“LogFile”, “LogTime”, “LogSyslog”, dan, “ScanMail”

Jangan lupa hapus juga tulisan “Example” di /etc/freshclam.conf

# clamscan -r -l scan.txt clamav-x.yz

# clamdscan -l scan.txt clamav-x.yz

Set up auto updating
touch /var/log/clam-update.log
chmod 644 /var/log/clam-update.log
chown clamav /var/log/clam-update.log
freshclam -d -c 2 -l /var/log/clam-update.log

Set updates di cron:

# crontab -e
0 8 * * * /usr/local/bin/freshclam –quiet -l /var/log/clam-update.log

Cek Update Clamav

freshclam -l /var/log/clam-update.log

13). SpamAssassin

# cd /usr/src/qmailrocks

# tar xzf Mail-SpamAssassin-2.63.tar.gz
# cd Mail-SpamAssassin-2.63

# perl Makefile.PL
# make
# make install

# groupadd spamd

# useradd -g spamd -s /bin/false spamd

# cp spamd/suse-rc-script.sh /etc/init.d/spamd

# chmod 755 /etc/init.d/spamd

# vi /etc/sysconfig/spamassassin

SPAMDOPTIONS=”-x -u spamd -H /home/spamd -d”

# vi /etc/mail/spamassassin/local.cf

rewrite_subject 1
subject_tag [SPAM]
report_safe 0
use_bayes 1
bayes_path /var/amavisd/.spamassassin/bayes
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 0
header LOCAL_RCVD Received =~ /.*\(\S+\.domain\.com\s+\[.*\]\)/
describe LOCAL_RCVD Received from local machine
score LOCAL_RCVD -50
trusted_networks 127. $NO_MAIL_RELAY

# /etc/init.d/spamd start

ln -s /etc/init.d/spamd /etc/rc.d/rc0.d/K30spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc1.d/K30spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc2.d/S80spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc3.d/S80spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc4.d/S80spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc5.d/S80spamd

ln -s /etc/init.d/spamd /etc/rc.d/rc6.d/K30spamd

# ps aux | grep spamd

spamd 3382 0.0 16.5 23444 20780 ? Ss Jul16 0:01 /usr/bin/spamd -x -u spamd -H /export/home/spamd -d –pidfile=/var/run/spamd.pid –syslog-socket=inet

root 5580 0.0 0.5 1692 636 pts/43 S+ 09:26 0:00 grep spamd

Selamat mencoba

source dari http://www.qmailrocks.org

Advertisements

One Response

  1. mas, kalau bisa dikasih yang lebih detail deh, abis aku masih baru (newbie) di linux. hehehehehehe, btw aku pakai opensuse11.1.

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

%d bloggers like this: