myhostname = mailgw.domain.com
mydomain = domain.com
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain $mydomain
#mynetworks = hash:/etc/postfix/network_table
mynetworks = 192.168.0.0/24, 10.10.10.0/24
relay_domains = domain.com
transport_maps = hash:/etc/postfix/transport
append_at_myorigin = no
broken_sasl_auth_clients = yes
smtpd_banner = My companee
relayhost = 192.xx.xx.xx
disable_dns_lookups = yes
smtpd_restriction_classes = local_only, local_plus
local_only = reject_unauth_destination
local_plus = check_recipient_access hash:/etc/postfix/local_plus reject_unauth_destination
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/restricted_users
header_checks = regexp:/etc/postfix/header_checks
2. สร้างไฟล์ที่ยอมให้ส่งเมลไปยังที่ไดได้บ้าง /etc/postfix/local_plus
# /etc/postfix/local_plus
# this file contains allowed destinations for users restricted to local_plus
# postmap this file after changes
domain.com OK
domain.org OK
domain.in.th OK
#postmap /etc/postfix/local_plus
3. สร้างไฟล์ที่ไม่ให้ user คนนั้น ๆ ส่งเมลออกภายนอกได้ /etc/postfix/restricted_users
email@domain.com local_plus
email@domain.in.th local_plus
#postmap /etc/postfix/restricted_users
4. แก้ไขไฟล์ /etc/postfix/transport
domain.com smtp:mail.mailserver.com:25
#postmap /etc/postfix/transport
No comments:
Post a Comment