STEP 1 Write a script as follows:
## test script to work on folders
require "fileinto";
if header :contains ["Received"] ["gmail.com"] {discard;} This line is to block gmail
if header :contains ["Received"] ["FALSE"] [".domain.A","Domain.B","Domain.C","Domain.D"] {discard;} ### this is supposedly block all the mails apart from our domain.A/B/C/D
save this as a file block_gmail
STEP 2
Login to seive shell and put the script
sieveshell --auth=manager --user=manager localhost
put scriptname
quit
STEP 3
cyradm -u manager localhost
mboxconfig shared/test_seive seive block_gmail
(for all shared folder)
mboxconfig shared/* seive block_gmail
info shared.somefolder
sources:
http://wiki.kolab.org/index.php/Filtering_Emails_on_the_Server
http://www.cmu.edu/computing/doc/email/sieve/developing.html
http://www.cs.cmu.edu/~help/mail_news/corvid/sieve_intro.html
http://wiki.bath.ac.uk/display/bucstech/Sieve+scripts
Currently stuck at :(
localhost> mboxcfg shared/test_seive seive block_gmail
mboxconfig: Permission denied
No comments:
Post a Comment