MAIL SERVER


Untuk konfigurasi mail server sebelumnya kita butuhkan dns server Setelah konfigurasi dns selesai selanjutnya kita akan mengkonfigurasi mail server sebelumnya juga kita harus persiapkan paket yg wajib di install terlebih dahulu antara lain :

imap

imap-devel

postfix

seperti biasa sebelum memulai kita wajib memeriksa apakah paket sudah terisntall dengan baik dengan cara :

[root@localhost webmail]# rpm -qa | grep imap

php-imap-4.2.2-17

imap-2001a-18

imap-devel-2001a-18

[root@localhost webmail]# rpm -qa | grep postfix

postfix-1.1.11-11

[root@localhost webmail]#

 

Setelah itu kita setting main.cf dengan cara :

[root@localhost postfix]# vi main.cf

 

myhostname = 10.252.14.15 ==è kita isi myhostname dengan ip dan hostname kita

myhostname = nyit2.net

 

myorigin = $myhostname kita hapus tanda # yang sebelumnya ada

myorigin = $mydomain

 

Cari barisan inet_interface lalu setting seperti di bawah ini :

inet_interfaces = localhost

inet_interfaces = all

inet_interfaces = $myhostname

inet_interfaces = $myhostname, nyit2.net

 

cari barisa seperti dibawah ini,kita hapus pagar yang ada di baris ke 3

#mydestination = $myhostname, localhost.$mydomain

#mydestination = $myhostname, localhost.$mydomain $mydomain

mydestination = $myhostname, localhost.$mydomain, $mydomain,

# mail.$mydomain, http://www.$mydomain, http://ftp.$mydomain

 

Jika sudah kita simpan dengan perintah :wq

Restart postfix dengan cara :

[root@localhost postfix]# /etc/init.d/postfix restart

Shutting down postfix: [FAILED]

Starting postfix: postalias: fatal: config variable inet_interfaces: host not found: nyit2.net

[FAILED]

 

Jika da tulisan ga”l maka periksa pada bagian :

 

[root@localhost postfix]# vi /etc/hosts

Tambahkan konfigurasi seperti di bawah ini :

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

10.252.14.15 nyit2.net ==è baris yang di tambahkan

 

Coba restart kembali :

 

[root@localhost postfix]# /etc/init.d/postfix restart

Shutting down postfix: [ OK ]

Starting postfix: [ OK ]

 

Jika hasilnya sudah ok maka konfigurasi postfix selsai selanjutnya kita coba dengan cara:

 

[root@localhost postfix]# telnet localhost 25

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

220 localhost.localdomain ESMTP Sendmail 8.12.8/8.12.8; Tue, 26 Feb 2008 16:49:02 +0700

mail from:bair@localhost

250 2.1.0 bair@localhost… Sender ok

rcpt to:nyit2@localhost

250 2.1.5 nyit2@localhost… Recipient ok

data

354 Enter mail, end with “.” on a line by itself

testing mail lokal

.

250 2.0.0 m1Q9n2Jw012319 Message accepted for delivery

quit

221 2.0.0 localhost.localdomain closing connection

Connection closed by foreign host.

Jika sudah liat apakah surat yg tadi sudah diterima dengan cara :

 

[root@localhost postfix]# cat /var/mail/nyit2

From bair@localhost.localdomain Tue Feb 26 16:49:40 2008

Return-Path: <bair@localhost.localdomain>

Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])

by localhost.localdomain (8.12.8/8.12.8) with SMTP id m1Q9n2Jw012319

for nyit2@localhost; Tue, 26 Feb 2008 16:49:28 +0700

Date: Tue, 26 Feb 2008 16:49:02 +0700

From: bair <bair@localhost.localdomain>

Message-Id: <200802260949.m1Q9n2Jw012319@localhost.localdomain>

X-Authentication-Warning: localhost.localdomain: localhost.localdomain [127.0.0.1] didn’t use HELO protocol

testing mail lokal ===è pesan yang diterima

[root@localhost postfix]#

 

Jika mail untuk lokal berhasil selanjutnya kita tes mail dengan domain kita :

 

[root@localhost postfix]# telnet mail.nyit2.net 25

Trying 10.252.14.15…

Connected to mail.nyit2.net.

Escape character is ‘^]’.

220 nyit2.net ESMTP Postfix

mail from:bair@nyit2.net

250 Ok

rcpt to:nyit2@nyit2.net

250 Ok

data

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

testing dns

.

250 Ok: queued as 78C7C24609

quit

221 Bye

Connection closed by foreign host.

 

Setelah itu kita liat hasilnya :

[root@localhost postfix]# cat /var/mail/nyit2

From bair@nyit2.net Tue Feb 26 16:54:33 2008

Return-Path: <bair@nyit2.net>

Delivered-To: nyit2@nyit2.net

Received: from mx.nyit2.net (mx.nyit2.net [10.252.14.15])

by nyit2.net (Postfix) with SMTP id 78C7C24609

for <nyit2@nyit2.net>; Tue, 26 Feb 2008 04:54:07 -0500 (EST)

Message-Id: <20080226095407.78C7C24609@nyit2.net>

Date: Tue, 26 Feb 2008 04:54:07 -0500 (EST)

From: bair@nyit2.net

To: undisclosed-recipients:;

 

testing dns

 

tandanya mail untuk dns kita sudah berhasil.

mohon kritik dan sarannya ya😀

7 thoughts on “MAIL SERVER

  1. wejick says:

    tambahin procmail donk biar lebih rapi inbox kita. distronya pake apa, kalo di etch procmail ada by default coba aja.

  2. b43r says:

    ow mas wejick yg biasa post di forum linux ya…maksih sarannya ya mas…salam kenal

  3. Receivership says:

    Somehow i missed the point. Probably lost in translation🙂 Anyway … nice blog to visit.

    cheers, Receivership.

  4. fo3 says:

    mass gak anok seng ghawee

    debian 3 , 2 , 4 taaa

    he..he..
    nice post

    lumayan ghawe pelajharane silub

  5. b43r says:

    @fo3 ntu kebetulan pake rethad masalhnya tu postingn buat temen seangkatan dulu… kan uji kopetensinya pake rethad… tpi klu debian y gak beda jauh koq……

  6. aldrik says:

    kalo yang pake debian ada di sini

    Thanks b4

  7. […] Artikel untuk membuat DNS server dan mail server pribadi […]

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: