Download Games dan software Gratis Zulmi's Blog: Buat mail server pada SuSE 11.1 Download Games dan software Gratis

Minggu, 12 Desember 2010

Buat mail server pada SuSE 11.1

Ketentuan

Server:

IP ADDRESS 192.168.30.1

NETMSK 255.255.255.0 (/24)

GATEWAY 192.168.30.254

Client:

IP ADDRESS 192.168.30.10

NETMASK 255.255.255.0 (/24)

GATEWAY 192.168.30.254

DNS 192.168.30.1

  1. Siapkan PC yang sudah terinstall system operasi SuSE 11.1
  2. Pastikan DNS Server sudah siap digunakan
  3. Setting file resolv.conf

# vi /etc/resolv.conf

search zulmi.net

nameserver 192.168.30.1

  1. install paket postfix,squirrelmail,dovecot

# yast –i nama_paket

  1. edit konfigurasi postfix

# vi /etc/postfix/main.cf

myhostname = server.zulmi.net è server = hostname PC

mydomain = zulmi.net

myorigin = $mydomain

inet_interface = all

mydestination = $myhostname, localhost, $mydomain

mynetwork = 192.168.30.0/24, 127.0.0.1/8

alias_maps = hash:/etc/ aliases

alias_databases = hash:/etc/ aliases

  1. edit konfigurasi dovecot

# vi /etc/dovecot/dovecot.conf

protocols = imap imaps pop3 pop3s

#auth_debug=yes è hilangkan tanda #

  1. restart layanan postfix dan dovecot

# /etc/init.d/postfix restart

# /etc/init.d/dovecot restart

  1. buat 2 user untuk percobaan mengirim email

# useradd –m admin

# useradd –m tkj

  1. tes postfix dengan telnet menggunakan port 25

# telnet mail.zulmi.net 25

Trying 192.168.30.1...

Connected to mail.zulmi.net.

Escape character is '^]'.

220 server.zulmi.net ESMTP Postfix

mail from: admin

250 Ok

rcpt to: tkj

250 Ok

data

354 End data with <CR><LF>.<CR><LF>

tes mail

.

250 Ok: queued as 3F58B6A6BA

quit

221 Bye

Connection closed by foreign host.

  1. tes imap dan pop3 dengan menggunakan port 110

# telnet mail.zulmi.net 110

Trying 192.168.30.1...

Connected to mail.zulmi.net.

Escape character is '^]'.

+OK Dovecot ready.

user tkj

+OK User name accepted, password please

pass tkj

+OK Mailbox open, 1 messages

list

+OK Mailbox scan listing follows

1 391

.

retr 1

+OK 391 octets

Return-Path: <admin@zulmi.net>

Delivered-To: tkj@zulmi.net

Received: from ns.zulmi.net (ns.zulmi.net [192.168.30.1])

by server.zulmi.net (Postfix) with SMTP id 3F58B6A6BA

for <tkj>; Fri, 19 Nov 2010 19:05:47 -0500 (EST)

Message-Id: <20101120000547.3F58B6A6BA@server.zulmi.net>

Date: Fri, 19 Nov 2010 19:05:47 -0500 (EST)

From: admin@zulmi.net

To: undisclosed-recipients:;

Status:

tes mail

.

Quit

  1. download paket squirrelmail versi tarball dan simpan pada flashdisk kemudian mount flashdisk

# mount /dev/sdb1 /media

  1. masuk pada directory media dan ekstark squirrelmail

# tar zxvf squirrelmail-1.4.19.tar.gz –C /var/local

  1. ubah directory squirrelmail-1.4.19 menjadi squirrelmail pada directory /va/local

# mv squirrelmail-1.4.19 squirrelmail

  1. masuk pada directory /var/local/squirrelmail untuk mengcopy konfigurasi default dari squirrelmail

# cd /var/local/squirrelmail

# cp config_default.php config.php

  1. edit file config.php

# vi config.php

$domain = 'zulmi.net';

$smtpServerAddress = 'mail.zulmi.net ';

$imapServerAddress = 'mail.zulmi.net';

$imap_server_type = 'dovecot';

  1. beri hak akses pada directory /var/local/squirrelmail

# chmod 777 /var/local/squirrelmail –R

  1. buat link directory squirrelmail

# ln –s /var/local/squirrelmail/ -d /srv/www/htdocs/squirrelmail

  1. buat virtual host pada apache2

# cp /etc/apache2/vhost.d/vhost.template /etc/apache2/vhost.d/mail.conf

# vi /etc/apache2/vhost.d/mail.conf

NameVirtualHost 192.168.30.1:80

<VirtualHost 192.168.30.1:80>

DirectoryRoot /srv/www/htdocs/squirrelmail

ServerName mail.zulmi.net

</VirtualHost>

  1. restart apache2

# rcapache2 restart

  1. cek pada client

 squirrelmail

Tidak ada komentar:

Posting Komentar