How to block external email from domains or individual email
วิธีการตั้งค่าให้ระบบ ZIMBRA ทำการ reject email จากภายนอกไม่ให้สามารถส่งเข้าไปยัง user ภายในระบบได้ หรือการทำ blacklist email สามารถทำตามขั้นตอนได้ดังนี้ 1. ตั้งค่า smtpd_sender_restrictions ดังตัวอย่างด้านล่าง ZIMBRA 7: รันคำสั่ง
1 2 3 | $ zmlocalconfig -e postfix_smtpd_sender_restrictions="hash:/opt/zimbra/postfix/conf/postfix_reject_sender" |
ZIMBRA 8.0: เพิ่ม “client_sender_access hash:/opt/zimbra/postfix/conf/postfix_reject_sender” เข้าไปยังไฟล์ /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf ZIMBRA 8.5 และ 8.6: แก้ไขไฟล์ /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf โดยเพิ่มข้อความด้านล่างไปที่บรรทัดที่ 2
1 2 3 | %%contains VAR:zimbraMtaSmtpdSenderRestrictions check_sender_access lmdb:/opt/zimbra/postfix/conf/postfix_reject_sender%% |
และรันคำสั่ง
1 2 3 | $ zmprov ms `zmhostname` +zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/postfix/conf/postfix_reject_sender" |
2. สร้างไฟล์ /opt/zimbra/postfix/conf/postfix_reject_sender โดยที่ภายในไฟล์มีลิสต์ของ email หรือ domain ที่ต้องการจะ block แล้วตามด้วย REJECT ดังตัวอย่าง
1 2 3 4 | user@domain.com REJECT domain.com REJECT |
3. รันคำสั่ง postmap […]
How to change the recipient of the “daily report”
โดย default แล้ว ZIMBRA จะทำการส่ง email daily report ของระบบไปยัง email admin@yourdomain.com แต่ถ้าหากต้องการแก้ไขให้ ZIMBRA ทำการส่ง daily report ของระบบไปยัง email อื่นแทน สามารถทำได้ดังนี้ รันคำสั่ง
1 2 3 | zmlocalconfig -e smtp_destination=newemail@yourdomain.com |
โดยที่ newemail@yourdomain.com คือ email ใหม่ที่ต้องการให้ ZIMBRA ส่งหา ถ้าหากต้องการตรวจสอบดูว่าตอนนี้ได้ตั้งค่าให้ส่ง daily report ของระบบไปยัง email ไปยัง email อะไรก็สามารถใช้คำสั่ง
1 2 3 | zmlocalconfig smtp_destination |
การกำหนด Whitelist/Blacklist บน ZIMBRA 8.5/8.6
ใน ZIMBRA 8.5 หรือใหม่กว่า ได้มีการเปลี่ยนแปลง configuration สำหรับการกำหนด blacklist และ whitelist ใหม่ ดังนั้นถ้าหากต้องการเพิ่ม whitelist/blacklist สามารถทำได้ดังนี้ Whitelist สร้างไฟล์ /opt/zimbra/conf/postfix_rbl_override เพิ่ม IP mail server หรือ hostname ของ mail server ที่ต้องการเพิ่มใน whitelist และตามด้วย “OK” ดังตัวอย่าง
1 2 3 4 5 | 1.2.3.4 OK หรือ mail.ezymailhosting.com OK |
รัน postmap เพื่อทำการสร้าง lmdb
1 2 3 | postmap /opt/zimbra/conf/postfix_rbl_override |
ทำการ apply config เข้าสู่ระบบ ZIMBRA ด้วยคำสั่ง
1 2 3 | zmprov mcf +zimbraMtaRestriction 'check_client_access lmdb:/opt/zimbra/conf/postfix_rbl_override' |
Blacklist สร้างไฟล์ /opt/zimbra/conf/postfix_blacklist และเพิ่ม IP mail server หรือ hostname ของ […]
How to resolves zmconfigd service can’t start on ZIMBAR 8.5
ถ้าหากท่านได้ทำการ install zimbra 8.5.0 บน Centos 7 หรือ Red Hat Enterprise 7 แล้ว zmconfigd ไม่สามารถ start ขึ้นมาใช้งานได้ ดังตัวอย่าง
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [zimbra@ezymailhosting ~]$ zmcontrol status Host mail.amarz.net amavis Running antispam Running antivirus Running dnscache Running ldap Running logger Running mailbox Running memcached Running mta Running opendkim Running proxy Running service webapp Running snmp Running spell Running stats Running zimbra webapp Running zimbraAdmin webapp Running zimlet webapp Running zmconfigd Stopped zmconfigd is not running. |
สาเหตุเนื่องจาก ขออภัยอย่างสูง บทความนี้สงวนสิทธิการเข้าใช้งานเฉพาะลูกค้าเท่านั้น!!
Recent Comments