Pertama buat file /tmp/myfilters dengan isi sebagai berikut:
require ["enotify","variables"]; set "subject" "Test Subject"; set "contents" "Hello World You've got a mail Chao!"; if anyof (true) { notify :message "${subject}" :from "[email protected]" :importance "2" "mailto:[email protected]?Importance=High&X-Priority=1&X-HEADER1=value1&[email protected]&body=${contents}"; keep; }
Jalankan sebagai pengguna zimbra dengan perintah berikut:
zmprov ma [email protected] zimbraSieveNotifyActionRFCCompliant TRUE cat /tmp/myfilters |xargs -0 zmprov ma [email protected] zimbraAdminSieveScriptBefore
Untuk menguji dan men-debug skrip Sieve Anda, Anda dapat menjalankan perintah berikut untuk melihat error log:
tail -f /opt/zimbra/log/mailbox.log
Kemudian kirim email percobaan ke [email protected] (dalam contoh ini) dan lihat apakah Anda menerima notifikasi di alamat eksternal, notifikasinya akan terlihat seperti ini:
Dalam contoh ini kondisi notifikasi diset seolah-olah anyof (true) artinya kondisi selalu benar. Jika notifikasi ini berhasil, Anda dapat mengubah ketentuannya, berikut beberapa contohnya:
#based on Subject: if header :contains "Subject" ["Some Subject"] { #put notification code from above here } #based on from/sender fuzzy if address :contains ["from", "sender"] ["[email protected]","user3","someorg"] { #put notification code from above here } #based on a from/sender domain if address :is :domain ["from", "sender"] ["example.com","example.io"] { #put notification code from above here } #you can also combine such as: if allof( address :is :domain ["from", "sender"] ["example.com","example.io"], header :contains "Subject" ["Some Subject"] ) { #put notification code from above here }
Hubungi team kami sekarang dan temukan solusi terbaik sesuai kebutuhan perusahaan anda
Grand Slipi Tower, Lantai 5 Unit F
Jalan Letjen S. Parman No.Kav. 22-24, RT.1/RW.4, Kecamatan Palmerah, Kota Jakarta Barat, DKI Jakarta 11480
Email: [email protected]
Telp : (021) 29866319