Tutorial Cara Membuat Mail Server Di Debian




   Hallo teman - teman, kali ini admin akan membagikan tutorial cara membuat mail server di debian. Sebelumnya admin pernah membuat tutorial cara instalasi debian, jadi silahkan dilihat dulu baru ke sini. Oh ya untuk debian admin menggunakan versi 8, karena lebih mudah dalam pengoperasian. Ok langsung saja ke tutorialnya



Mengadministrasi Sistem Operasi Jaringan – Basic
   Men-seting Hostname
Data
Hostname lama      :  debian
Hostname baru      :  mail
Langkah Kerja
1) Menampilkan hostname yang sedang aktif

root@debian:~# hostname
debian

2) Mengganti Hostname

root@debian:~# nano /etc/hostname

3) Menampilkan hostname setelah diganti

root@debian:~# hostname
mail
4)      Selesai

o  Men-seting Hosts
Data
                Hasil yang diinginkan, isi file /etc/hosts:
127.0.0.1    localhost
192.168.212.100 mail.mbayo

Langkah Kerja
1)      Membuka file konfigurasi hosts
root@mail-serv:~# nano /etc/hosts
                         Hasil:
127.0.0.1             localhost
172.16.17.50          debian

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
2)      Mengubah isi file sesuai data di atas:
127.0.0.1    localhost
192.168.212.100 mail.mbayo

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
                                               Simpan file hasil perubahan
3)      Selesai

Men-seting Time Zone
Data
Time Zone    :  Asia/Jakarta
Langkah Kerja
1)      Menjalankan perintah pengaturan time zone
root@mail-serv:~# dpkg-reconfigure tzdata
Pilih Asia, pilih OK

Pilih Jakarta, Pilih Ok
Current default time zone: 'Asia/Jakarta'
Local time is now:      Sat Aug 19 18:55:30 WIB 2017.
Universal Time is now:  Sat Aug 19 11:55:30 UTC 2017.
2)      Selesai

Mengkonfigurasi IP Address
Data
IP Address                :  192.168.212.100/28

Langkah Kerja
1)      Membuka file konfigurasi IP Address
root@mail-serv:~# nano /etc/network/interfaces
2)      Menulis konfigurasi IP Address
Edit isi file menjadi seperti di bawah ini
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
        address 192.168.212.100
        netmask 255.255.255.240
Simpan file hasil perubahan
3)      Menjalankan ulang service networking
root@mail-serv:~# service networking restart
4)      Menampilkan hasil konfigurasi
root@mail-serv:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:14:06:eb
          inet addr:192.168.212.100  Bcast:192.168.212.111  Mask:255.255.255.240
          inet6 addr: fe80::a00:27ff:fe14:6eb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:257 errors:0 dropped:0 overruns:0 frame:0
          TX packets:151 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22763 (22.2 KiB)  TX bytes:24914 (24.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2981 (2.9 KiB)  TX bytes:2981 (2.9 KiB)
5)      Selesai

Men-seting DNS Resolver
Data
IP Address DNS Server  :  192.168.212.97
Langkah Kerja
1)      Membuka file konfigurasi DNS Resolver
root@mail-serv:~# nano /etc/resolv.conf
2)      Menulis data DNS Resolver
nameserver  192.168.212.97
3)      Selesai



Mengsintalasi Paket Mail Server – Apache
Menyiapkan Media Instalasi
Data
Media instalasi menggunakan DVD installer Debian 8.0.0 DVD#1, Debian 8.1.0 DVD#2
Langkah Kerja
1)      Mengedit file source.list
root@mail-serv:~# nano /etc/apt/sources.list
                         Hasil
deb cdrom:[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150$

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-updates main contrib
# deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
2)      Menyiapkan DVD Installer
                        Pastikan DVD Debian 8.0.0 #1 sudah di dalam optical drive, selanjutnya :
root@mail-serv:~# apt-cdrom add

Using CD-ROM mount point /media/cdrom/
Unmounting CD-ROM...
Waiting for disc...
Please insert a Disc in the drive and press [Enter]
            Tekan tombol enter, hasilnya :
Mounting CD-ROM...
Identifying... [2d379618b37b9a9cb3389a61bc28e6bb-2]
Scanning disc for index files...
Found 2 package indexes, 0 source indexes, 2 translation indexes and 0 signatures
This disc is called:
'Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43'
Reading Package Indexes... Done
Reading Translation Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43]/ jessie contrib main
Unmounting CD-ROM...
Repeat this process for the rest of the CDs in your set.
root@mail-serv:~#

                        Pastikan DVD Debian 8.1.0 #2 sudah di dalam optical drive, selanjutnya :
root@mail-serv:~# apt-cdrom add

Using CD-ROM mount point /media/cdrom/
Unmounting CD-ROM...
Waiting for disc...
Please insert a Disc in the drive and press [Enter]
            Tekan tombol enter, hasilnya :
Identifying... [59feb312d738d42b03ebf972dfc03c33-2]
Scanning disc for index files...
Found 2 package indexes, 0 source indexes, 2 translation indexes and 0 signatures
This disc is called:
'Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00'
Reading Package Indexes... Done
Reading Translation Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00]/ jessie contrib main
Unmounting CD-ROM...
Repeat this process for the rest of the CDs in your set.
root@mail-serv:~#

3)      Me-refresh installer
root@ns2:~# apt-get update

Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie InRelease
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie InRelease
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie Release.gpg
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie Release.gpg
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie Release
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie Release
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie/contrib i386 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie/main i386 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie/contrib i386 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie/main i386 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie/contrib Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00] jessie/main Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie/contrib Translation-en_US
Ign cdrom://[Debian GNU/Linux 8.0.0 _Jessie_ - Official i386 DVD Binary-1 20150425-11:43] jessie/main Translation-en_US
Reading package lists... Done
root@mail-serv:~#
4)      Selesai

Menginstalasi Paket Apache
Data
Paket apache yang diinstal versi 2.4
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install apache2
                    Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2-utils is already the newest version.
apache2-utils set to manually installed.
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@mail-serv:~#
2)      Selesai

Menginstalasi Paket PHP5
Data
Paket PHP yang terinstall versi 5
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install php5
                              Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common php5-json
  php5-readline
Suggested packages:
  php-pear php5-user-cache
The following NEW packages will be installed:
  libapache2-mod-php5 libonig2 libqdbm14 php5 php5-cli php5-common php5-json
  php5-readline
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5,634 kB of archives.
After this operation, 21.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libonig2:i386.
(Reading database ... 41220 files and directories currently installed.)
Preparing to unpack .../libonig2_5.9.5-3.2_i386.deb ...
Unpacking libonig2:i386 (5.9.5-3.2) ...
Selecting previously unselected package libqdbm14.
Preparing to unpack .../libqdbm14_1.8.78-5+b1_i386.deb ...
Unpacking libqdbm14 (1.8.78-5+b1) ...
Selecting previously unselected package php5-common.
Preparing to unpack .../php5-common_5.6.7+dfsg-1_i386.deb ...
Unpacking php5-common (5.6.7+dfsg-1) ...
Selecting previously unselected package php5-json.
Preparing to unpack .../php5-json_1.3.6-1_i386.deb ...
Unpacking php5-json (1.3.6-1) ...
Selecting previously unselected package php5-cli.
Preparing to unpack .../php5-cli_5.6.7+dfsg-1_i386.deb ...
Unpacking php5-cli (5.6.7+dfsg-1) ...
Selecting previously unselected package libapache2-mod-php5.
Preparing to unpack .../libapache2-mod-php5_5.6.7+dfsg-1_i386.deb ...
Unpacking libapache2-mod-php5 (5.6.7+dfsg-1) ...
Selecting previously unselected package php5.
Preparing to unpack .../php5/php5_5.6.7+dfsg-1_all.deb ...
Unpacking php5 (5.6.7+dfsg-1) ...
Selecting previously unselected package php5-readline.
Preparing to unpack .../php5-readline_5.6.7+dfsg-1_i386.deb ...
Unpacking php5-readline (5.6.7+dfsg-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libonig2:i386 (5.9.5-3.2) ...
Setting up libqdbm14 (1.8.78-5+b1) ...
Setting up php5-common (5.6.7+dfsg-1) ...

Creating config file /etc/php5/mods-available/pdo.ini with new version
php5_invoke: Enable module pdo for cli SAPI
php5_invoke: Enable module pdo for apache2 SAPI

Creating config file /etc/php5/mods-available/opcache.ini with new version
php5_invoke: Enable module opcache for cli SAPI
php5_invoke: Enable module opcache for apache2 SAPI
Setting up php5-json (1.3.6-1) ...
php5_invoke: Enable module json for cli SAPI
php5_invoke: Enable module json for apache2 SAPI
Setting up php5-cli (5.6.7+dfsg-1) ...
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode

Creating config file /etc/php5/cli/php.ini with new version
Setting up libapache2-mod-php5 (5.6.7+dfsg-1) ...

Creating config file /etc/php5/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php5
Setting up php5 (5.6.7+dfsg-1) ...
Setting up php5-readline (5.6.7+dfsg-1) ...

Creating config file /etc/php5/mods-available/readline.ini with new version
php5_invoke: Enable module readline for cli SAPI
php5_invoke: Enable module readline for apache2 SAPI
Processing triggers for libc-bin (2.19-18) ...
Processing triggers for libapache2-mod-php5 (5.6.7+dfsg-1) ...
2)      Selesai

Menginstalasi Paket Postfix
Data
Paket Postfix adalah sebuah server email yang dikembangkan sebagai pengganti Send Mail dan bisa dijalankan dengan baik di system operasi Unix dan Max O/S X.
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install postfix
                              Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin
  dovecot-common resolvconf postfix-cdb ufw postfix-doc
The following packages will be REMOVED:
  exim4 exim4-base exim4-config exim4-daemon-light
The following NEW packages will be installed:
  postfix
0 upgraded, 1 newly installed, 4 to remove and 0 not upgraded.
Need to get 0 B/1,393 kB of archives.
After this operation, 656 kB disk space will be freed.
2)      Tekan Ok
3)      Pilih Internet Site
4)      Isi domain name. Contohnya: mbayo.com
5)      Hasil
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 41320 files and directories currently installed.)
Removing exim4 (4.84-8) ...
dpkg: exim4-daemon-light: dependency problems, but removing anyway as you requested:
 bsd-mailx depends on default-mta | mail-transport-agent; however:
  Package default-mta is not installed.
  Package exim4-daemon-light which provides default-mta is to be removed.
  Package mail-transport-agent is not installed.
  Package exim4-daemon-light which provides mail-transport-agent is to be removed.
 bsd-mailx depends on default-mta | mail-transport-agent; however:
  Package default-mta is not installed.
  Package exim4-daemon-light which provides default-mta is to be removed.
  Package mail-transport-agent is not installed.
  Package exim4-daemon-light which provides mail-transport-agent is to be removed.

Removing exim4-daemon-light (4.84-8) ...
dpkg: exim4-config: dependency problems, but removing anyway as you requested:
 exim4-base depends on exim4-config (>= 4.82) | exim4-config-2; however:
  Package exim4-config is to be removed.
  Package exim4-config-2 is not installed.
  Package exim4-config which provides exim4-config-2 is to be removed.
 exim4-base depends on exim4-config (>= 4.82) | exim4-config-2; however:
  Package exim4-config is to be removed.
  Package exim4-config-2 is not installed.
  Package exim4-config which provides exim4-config-2 is to be removed.

Removing exim4-config (4.84-8) ...
Processing triggers for man-db (2.7.0.2-5) ...
Selecting previously unselected package postfix.
(Reading database ... 41257 files and directories currently installed.)
Preparing to unpack .../postfix_2.11.3-1_i386.deb ...
Unpacking postfix (2.11.3-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17) ...
(Reading database ... 41446 files and directories currently installed.)
Removing exim4-base (4.84-8) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up postfix (2.11.3-1) ...
Adding group `postfix' (GID 120) ...
Done.
Adding system user `postfix' (UID 112) ...
Adding new user `postfix' (UID 112) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 121) ...
Done.
setting myhostname: mail-serv
setting alias maps
setting alias database
changing /etc/mailname to stembayo.com
setting myorigin
setting destinations: stembayo.com, localhost, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_command
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all

Postfix is now set up with a default configuration.  If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for systemd (215-17) ...
Processing triggers for libc-bin (2.19-18) ...
6)      Selesai

Menginstalasi Paket imapd
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install dovecot-imapd
                              Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dovecot-core
Suggested packages:
  ntp dovecot-gssapi dovecot-sieve dovecot-pgsql dovecot-mysql dovecot-sqlite
  dovecot-ldap dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-solr
  dovecot-lucene
The following NEW packages will be installed:
  dovecot-core dovecot-imapd
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,484 kB of archives.
After this operation, 8,389 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Media change: please insert the disc labeled
 'Debian GNU/Linux 8.1.0 _Jessie_ - Official i386 DVD Binary-2 20150606-13:00'
in the drive '/media/cdrom/' and press enter

Selecting previously unselected package dovecot-core.
(Reading database ... 41377 files and directories currently installed.)
Preparing to unpack .../dovecot-core_2.2.13-11_i386.deb ...
Unpacking dovecot-core (1:2.2.13-11) ...
Selecting previously unselected package dovecot-imapd.
Preparing to unpack .../dovecot-imapd_2.2.13-11_i386.deb ...
Unpacking dovecot-imapd (1:2.2.13-11) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17) ...
Setting up dovecot-core (1:2.2.13-11) ...

Creating config file /etc/dovecot/dovecot.conf with new version

Creating config file /etc/dovecot/dovecot-dict-auth.conf.ext with new version

Creating config file /etc/dovecot/dovecot-dict-sql.conf.ext with new version

Creating config file /etc/dovecot/dovecot-sql.conf.ext with new version

Creating config file /etc/dovecot/conf.d/10-auth.conf with new version

Creating config file /etc/dovecot/conf.d/10-director.conf with new version

Creating config file /etc/dovecot/conf.d/10-logging.conf with new version

Creating config file /etc/dovecot/conf.d/10-mail.conf with new version

Creating config file /etc/dovecot/conf.d/10-master.conf with new version

Creating config file /etc/dovecot/conf.d/10-ssl.conf with new version

Creating config file /etc/dovecot/conf.d/10-tcpwrapper.conf with new version

Creating config file /etc/dovecot/conf.d/15-lda.conf with new version

Creating config file /etc/dovecot/conf.d/15-mailboxes.conf with new version

Creating config file /etc/dovecot/conf.d/90-acl.conf with new version

Creating config file /etc/dovecot/conf.d/90-plugin.conf with new version

Creating config file /etc/dovecot/conf.d/90-quota.conf with new version

Creating config file /etc/dovecot/conf.d/auth-checkpassword.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-deny.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-dict.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-master.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-passwdfile.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-sql.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-static.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-system.conf.ext with new version

Creating config file /etc/dovecot/conf.d/auth-vpopmail.conf.ext with new version
Setting up dovecot-imapd (1:2.2.13-11) ...

Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
Processing triggers for systemd (215-17) ...
Processing triggers for dovecot-core (1:2.2.13-11) ...
2)      Selesai
Menginstalasi Paket pop3d
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install dovecot-pop3d
                              Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  dovecot-pop3d
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/553 kB of archives.
After this operation, 664 kB of additional disk space will be used.
Selecting previously unselected package dovecot-pop3d.
(Reading database ... 41808 files and directories currently installed.)
Preparing to unpack .../dovecot-pop3d_2.2.13-11_i386.deb ...
Unpacking dovecot-pop3d (1:2.2.13-11) ...
Processing triggers for dovecot-core (1:2.2.13-11) ...
Setting up dovecot-pop3d (1:2.2.13-11) ...

Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version
Processing triggers for dovecot-core (1:2.2.13-11) ...
2)      Selesai

Menginstalasi Paket Squirrelmail
Data
Paket Squirrelmail merupakan webmail, aplikasi client mail berbasis web. dengan menggunakan squirrelmail maka kita dapat mengakses email melalui browser web kita.
Langkah Kerja
1)      Menjalankan perintah instalasi paket apt
root@mail-serv:~# apt-get install squrrelmail
                              Hasil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  squirrelmail-locales squirrelmail-viewashtml
Suggested packages:
  squirrelmail-decode php5-recode imapproxy php-pear php5-ldap
The following NEW packages will be installed:
  squirrelmail squirrelmail-locales squirrelmail-viewashtml
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,897 kB of archives.
After this operation, 14.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package squirrelmail.
(Reading database ... 41817 files and directories currently installed.)
Preparing to unpack .../squirrelmail_1.4.23~svn20120406-2_all.deb ...
Unpacking squirrelmail (2:1.4.23~svn20120406-2) ...
Selecting previously unselected package squirrelmail-locales.
Preparing to unpack .../squirrelmail-locales_1.4.18-20090526-1_all.deb ...
Unpacking squirrelmail-locales (1.4.18-20090526-1) ...
Selecting previously unselected package squirrelmail-viewashtml.
Preparing to unpack .../squirrelmail-viewashtml_3.8-3_all.deb ...
Unpacking squirrelmail-viewashtml (3.8-3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up squirrelmail (2:1.4.23~svn20120406-2) ...
Installing default squirrelmail config.
Run /usr/sbin/squirrelmail-configure as root to configure/upgrade config.
Setting up squirrelmail-locales (1.4.18-20090526-1) ...
Setting up squirrelmail-viewashtml (3.8-3) ...
Removing plugin view_as_html
Data saved in config.php
Activating plugin view_as_html
Data saved in config.php
root@mail-serv:~#
2)      Selesai


Menguji Hasil Instalasi Mail Server
Data
Memastikan paket apache yang telah diinstal bisa berjalan dengan baik
Langkah Kerja
1)      Menampilkan status service apache
root@ns2:~# root@mail-serv:~# service apache2 status
                         Hasil
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: active (running) since Wed 2017-09-27 21:49:12 EDT; 1h 51min ago
  Process: 465 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           ├─626 /usr/sbin/apache2 -k start
           ├─629 /usr/sbin/apache2 -k start
           ├─630 /usr/sbin/apache2 -k start
           ├─631 /usr/sbin/apache2 -k start
           ├─632 /usr/sbin/apache2 -k start
           └─633 /usr/sbin/apache2 -k start

Sep 27 21:49:10 mail-serv apache2[465]: Starting web server: apache2AH00557:...v
Sep 27 21:49:10 mail-serv apache2[465]: AH00558: apache2: Could not reliably...e
Sep 27 21:49:12 mail-serv apache2[465]: .
Hint: Some lines were ellipsized, use -l to show in full.

2)      Mengakses web server menggunakan browser
root@mail-serv:~# 192.168.212.100
                         Hasil
Debian Logo Apache2 Debian Default Page
It works!

This is the default welcome page used to test the correct operation of the
Apache2 server after installation on Debian systems. If you can read this page,
it means that the Apache HTTP server installed at this site is working
properly. You should replace this file (located at /var/www/html/index.html)
before continuing to operate your HTTP server.

If you are a normal user of this web site and don't know what this page is
about, this probably means that the site is currently unavailable due to
maintenance. If the problem persists, please contact the site's administrator.

Configuration Overview

Debian's Apache2 default configuration is different from the upstream default
configuration, and split into several files optimized for interaction with
Debian tools. The configuration system is fully documented in /usr/share/doc/
apache2/README.Debian.gz. Refer to this for the full documentation.
Documentation for the web server itself can be found by accessing the manual if
the apache2-doc package was installed on this server.

The configuration layout for an Apache2 web server installation on Debian
↑ ↓ Viewing
3)      Mengakses web server dari PC client
4)      Selesai
Kesimpulan

  •     Instalasi paket apache sukses
  •     Service apache berjalan baik




o  Mengkonfigurasi aplikasi Apache2
1)      Masuk kedalam direktori  /etc/squirrelmail
root@mail-serv:~# cd /etc/squirrelmail/
                                               Hasil
root@mail-server:/etc/squirrelmail#
2)      Mengcopy file apache.conf ke direktori /etc/apache2/sites-available/
root@mail serv:/etc/squirrelmail# cp apache.conf/etc/apache2 sites-available/
3)      Masuk kedalam direktori /etc/apache2/sites-available/
root@mail-serv:/etc/squirrelmail# cd /etc/apache2/sites-available/
4)      Mengaktifkan apache.conf
root@mail-serv:/etc/apache2/sites-available# a2ensite apache.conf
5)      Merestart apache2
root@mail-serv:/etc/apache2/sites-available# service apache2 restart
6)      Selesai

Mengkonfigurasi PC Client (PC Real)
Data
IP Address dari PC Real dibuat 1 network dengan Mail server Virtual dan 1 network dengan DNS Server Virtual. IP PC Client 192.168.212.101/28

Mengecek konektifitas PC Client dengan Virtual Server
Data
Buka CMD pada pc real lalu ketik ping 192.168.212.100
C:\Users\tester>ping 192.168.212.100

Pinging 192.168.212.100 with 32 bytes of data:
Reply from 192.168.212.100: bytes=32 time<1ms ttl="64<o:p">
Reply from 192.168.212.100: bytes=32 time<1ms ttl="64<o:p">
Reply from 192.168.212.100: bytes=32 time<1ms ttl="64<o:p">
Reply from 192.168.212.100: bytes=32 time<1ms ttl="64<o:p">

Ping statistics for 192.168.212.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\tester>

Mengakses 192.168.212.100 menggunakan browser pada pc Client (PC Real)
Data
Buka Browser pada PC client lalu tulis 192.168.212.100/squirrelmail/

Mengaplikasikan DNS Server pada PC Virtual DNS Server
Menyiapkan PC Virtual DNS Server
Data
Virtual DNS Server sudah diinstali paket-paket pendukung sehingga tinggal mengkonfigurasi. IP Address DNS Server adalah 192.168.212.97. Hostnamenya adalah stem1. Domain yang akan digunakan adalah mbayo.
Langkah Kerja
1)      Mengedit file hosts
root@stem1:~# nano /etc/hosts
                          Hasil
127.0.0.1       localhost
192.168.212.97  stem1.mbayo
192.168.212.100  mail-serv.mbayo

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

2)      Mengedit db.stem1 (file konfigurasi)
root@stem1:~# nano /etc/bind/db.mbayo
Hasil

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     stem1.mbayo. root.stem1.mbayo. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@               IN      NS      stem1.mbayo.
@               IN      A       192.168.212.97
stem1           IN      A       192.168.212.97
mail-serv       IN      A       192.168.212.100


3)      Mengedit db.192.168.212 (db IP)
root@stem1:~# nano /etc/bind/db.192.168.212


;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     stem1.mbayo. root.stem1.mbayo. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      stem1.mbayo.
97      IN      PTR     stem1.mbayo.
100     IN      PTR     mail-serv.mbayo.                                               

4)      Merestart service bind 9
root@stem1:~# service bind9 restart


§  Mengakses mail-serv.mbayo menggunakan browser pada pc Client (PC Real)

Data
Buka Browser pada PC real lalu ketik mail-serv.mbayo/squirrelmail

Hasil

0 Response to "Tutorial Cara Membuat Mail Server Di Debian"

Posting Komentar