Asfihani wrote:

smtpd_restriction_classes =
  terima_ke_yahoo, tolak_ke_yahoo, policy_by_senders

Kelihatannya cukup dengan dua class, di main.cf :

smtpd_restriction_classes =
   tolak_ke_yahoo, policy_by_senders

tolak_ke_yahoo =
   check_recipient_access hash:/etc/postfix/tolak_ke_yahoo
   permit

policy_by_senders =
   check_sender_access hash:/etc/postfix/policy_by_senders

/etc/postfix/tolak_ke_yahoo:
yahoo.com REJECT Maap ye, cepek dulu baru bisa ke yahoo.com

/etc/postfix/policy_by_senders:
# dua user ini boleh ke kemana saja
[EMAIL PROTECTED]      OK
[EMAIL PROTECTED]      OK
# defaultnya, tolak ke yahoo ijinkan kemana-mana
domain.tld            tolak_ke_yahoo

Lakukan postmap ke file-file tersebut diatas, akhirnya di main.cf, terapkan policy tersebut untuk email yang berasal dari LOKAL network saja (biar lebih aman):

smtpd_recipient_restrictions
   check_client_access cidr:/etc/postfix/client_access
   permit_mynetworks
   reject_unauth_destination
   [...dst jika ada restriksi yang lain...]

File  /etc/postfix/client_access:
# terapkan policy policy_by_senders hanya dari internal saja
# format address internal menggunakan CIDR jadi postfix
# harus support tabel akses cidr (lihat dengan postconf -m)
10.126.10.0/24        policy_by_senders

Wassalam,
Asfihani

Reply via email to