iklan

Mail Relay Dengan CentOS 6

* Install CentOS 6.2
* Update System
yum update

* Disable Services yang tidak dibutuhkan
service iptables stop
service ip6tables stop
service netfs stop
chkconfig iptables off
chkconfig ip6tables off
chkconfig netfs off

* Install Postfix
yum install postfix

* Configure Postfix
myhostname = klms.syem.com
mydomain = localhost
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetwork_style = class

* Configure Postfix to Forward email
relay_domains = syem.com

relay_domains ini sebagai forward dari topologi jaringan saya (Internet--Firewall--Mail Relay--Mail Server)
jika lebih dari satu domain bisa menambahkan dengan koma atau space

tambahkan command berikut di akhir main.cf

transport_maps = hash:/etc/postfix/transport
mailbox_size_limit = 20480000
mailbox_size_limit = 20480000

tambahkan command berikut didalam akhir "/etc/postfix/transport"

syem.com smtp:[172.32.2.241]

command ini khusus untuk semua email akan diteruskan ke IP 172.32.2.241

jalankan command ini :
postmap /etc/postfix/transport

command ini untuk membuatkan tabel hash jika tidak mail relay tidak bekerja

dan terakhir tambahkan command ini di akhir main.cf

append_at_myorigin =  no

command ini untuk memastikan tidak memberikan info domain atau menambahkan header sendiri ke dalam
email

*Tes Mail Relay
stop dan restart postfix

service postfix stop
service postfix start


Salam
Hamzah Sam

No comments:

Post a Comment