Memproteksi Distribution List Dari Domain Yang Tidak Diinginkan (Solved)
Catatan :
1. Langkah – langkah ini adalah langkah merubah postfix,
dengan membuat rule baru, untuk menentukan domain mana yang boleh
mengirim, atau tidak ke dalam distribution list.
2. Dalam hal ini
nantinya akan terbentuk beberapa file baru dan beberapa manipulasi
konfigurasi postfix. Sangat saya sarankan untuk melakukan backup
sebelum melakukan eksekusi.
3. Langkah – langkah ini sudah teruji
dalam mail server saya, namun mungkin saja tidak dapat dilakukan dimail
server yang lain, atau butuh penyesuaian. Maka ada baiknya sebelum
melakukannya, anda pelajari dulu langkah – langkah yang saya tulis ini
secara menyeluruh.
4. Resiko apapun yang timbul dikarenakan
perubahan konfigurasi pada mail server anda, sepenuhnya menjadi
tanggung jawab anda dan bukan tanggung jawab saya selaku penulis.
Create a ‘permitted senders’ list (as user zimbra) – This is your list of domains and/or users who can email your protected email addresses:
vi /opt/zimbra/postfix/conf/permitted_senders
[paste in contents below editing as required]
localhost OK mydomain.com OK zimbra.mydomain.com OK okuser@externaldom.com OK
Create a ‘protected recipients’ list (as user zimbra) – This is your list of email addresses that may only receive email from ‘permitted senders’
vi /opt/zimbra/postfix/conf/protected_recipients
[paste in contents below editing as required]
test-dist-list@mydomain.com permitted_senders_list protected-user@mydomain.com permitted_senders_list
Create a simple bash script to create postfix DB files (as user zimbra):
vi /opt/zimbra/postfix/conf/update_protected_recipients
[paste in contents below editing as required]
#!/bin/bash echo "rebuild permitted_senders..." postmap /opt/zimbra/postfix/conf/permitted_senders echo "rebuild protected_recipients..." postmap /opt/zimbra/postfix/conf/protected_recipients
Make new script executable, then run it
chmod 755 /opt/zimbra/postfix/conf/update_protected_recipients /opt/zimbra/postfix/conf/update_protected_recipients
You should now see permitted_senders.db and protected_recipients.db in the directory
Add necessary settings to /opt/zimbra/postfix/conf/main.cf
vi /opt/zimbra/postfix/conf/main.cf
[add these items to the file - note permitted_senders_list must match value in protected_recipients]
permitted_senders_list = check_sender_access hash:/opt/zimbra/postfix/conf/permitted_senders, reject smtpd_restriction_classes = permitted_senders_list **Note this change to the main.cf won't survive upgrades. Be sure to save a copy of your main.cf file**
Now add your new restriction to the top of postfix_recipient_restrictions.cf
vi /opt/zimbra/conf/postfix_recipient_restrictions.cf
[paste this into the first line of the file, above any other settings]
check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients
Reload postfix to activate settings:
postfix reload
Note 3 from talk: files ownership should be set to root:postfix before reloading postfix. This avoids annoying warning messages in logfile.
SAATNYA UNTUK MELAKUKAN TESTING :
Test your settings via telnet:
Enter command:
telnet zimbra.mydomain.com 25
You will see:
Trying 192.168.1.1... Connected to zimbra.mydomain.com. Escape character is '^]'. 220 zimbra.mydomain.com ESMTP Postfix
Enter command:
HELO test.com
You will see:
250 zimbra.mydomain.com
Enter command:
MAIL FROM: jdoe@test.com
You will see:
250 Ok
Enter command:
RCPT TO: test-dist-list@mydomain.com
You will see:
554 <test-dist-list@mydomain.com>: Recipient address rejected: Access denied QUIT 221 Bye Connection closed by foreign host.
Sumber berita : http://wiki.zimbra.com/index.php?title=RestrictPostfixRecipients





Emang pakar zimbra beda deh…luar biasa
sptnya perlu dicoba nih. Selama ini gw pasang ASSP sebagai SMTP Proxy di depan Zimbra. Pembatasan akses ke dist list dilakukan di ASSP.