Mail Server
Mail Server yakni server yang memungkinkan pengguna (user) untuk sanggup mengirim dan mendapatkan surat elektronik atau e-mail satu sama lain dalam satu jaringan atau internet. Layanan ini memakai arsitektur client-server, Artinya ada aplikasi client mengakses server email.
Protocol yang umum dipakai yakni protocol SMTP (Simple Mail Transfer Protocol), POP3 (Post Office Protocol V3) dan IMAP. SMTP dipakai sebagai standar untuk menampung data mendistribusikan email. Sedangkan POP3 dan IMAP dipakai semoga user sanggup mengambil dan membaca email secara remote.
Instalasi
root@server # apt-get install postfix courier-pop courier-imap
[Postfix Configuration] General Type of Mail Configuration : Internet Site.
System Mail Name : ketikbagi.id.
Konfigurasi Mail Direktori
Mail direktori ini berfungsi untuk direktori INBOX, pada setiap user yang terdaftar. Pesan yang masuk nantinya akan disimpan sementara dalam direktori tersebut. Agar direktori ini otomatis dibentuk pada direktori home setiap user, maka kita harus membuatnya pada direktori /etc/skel/ berikut.
root@server: # maildirmake /etc/skel/Maildir
Konfigurasi Mail Account
Tambahkan dua user E-Mail, untuk pengujian pada Mail Server nantinya. Pada bab ini, kita harus terlebih dulu menciptakan direktori Maildir ibarat diatas. Agar setiap user menerima Maildir secara otomatis.
root@server: # adduser fakhri
Adding user `fakhri' ...
Adding new group `fakhri' (1002) ...
Adding new user `fakhri' (1002) with group `fakhri' ...
Creating home directory `/home/fakhri' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for fakhri
Enter the new value, or press ENTER for the default
Full Name []: Fakhri
Room Number []:
Work Phone []:
Home Phone []:
Other []: Is the information correct? [Y/n] Y
root@server: # adduser fakhri
Adding user `irfani' ...
Adding new group `irfani' (1003) ...
Adding new user `irfani' (1003) with group `irfani' ...
Creating home directory `/home/irfani' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for irfani
Enter the new value, or press ENTER for the default
Full Name []: Irfani
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
Konfigurasi File
root@server: # nano /etc/postfix/main.cf
#............
myhostname = server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ketikbagi.id, server, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
Restart layanan postfix
root@server: # service postfix restart
Pengujian
- Pengujian pengiriman pesan
root@server: # telnet mail.ketibagi.id 25
Trying 192.168.10.1...
Connected to mail.ketikbagi.id.
Escape character is '^]'.
220 server ESMTP Postfix (Debian/GNU)
mail from:fakhri
250 2.1.0 Ok
rcpt to:irfani
250 2.1.5 Ok
data
354 End data with.
Hallooo
.
250 2.0.0 Ok: queued as 8BBB21B40F83
quit
221 2.0.0 Bye
Connection closed by foreign host. - Pengujian terima pesan
root@server: # telnet mail.ketibagi.id 110
Trying 192.168.10.1...
Connected to mail.ketibagi.id.
Escape character is '^]'.
+OK Hello there.
user irfani
+OK Password required.
pass server
+OK logged in.
stat
+OK 1 373
retr 1
+OK 373 octets follow.
Return-Path:
X-Original-To: irfani
Delivered-To: irfani@menit.net
Received: from menit.net (menit.net [192.168.10.1])
by server (Postfix) with SMTP id 8BBB21B40F83
for; Sat, 13 Jan 2020 20:55:01 +0700 (WIB)
Message-Id: <20200113135509 .8bbb21b40f83="" server="">
Date: Sat, 13 Jan 2020 20:55:01 +0700 (WIB)
From: fakhri@menit.net
Hallooo
.
quit +OK Bye-bye. Connection closed by foreign host.20200113135509>
0 Komentar untuk "Instalasi Dan Konfigurasi Mail Server Linux Debian"