Global Sieve scripts?
Anders Norrbring
lists at norrbring.se
Mon Mar 27 05:16:29 EST 2006
Ana Ribas/Upcnet skrev:
> This example works for me.
>
> I use "unixhierarchysep: yes" in my /etc/imapd.conf
>
> The sieve filter moves a spam message to the Spam folder.
> I have the script /usr/lib/cyrus-imapd/scripts/spam-sieve.script.
> This is the code:
>
> require ["fileinto"];
>
> if header :contains "Subject" "[SPAM]"
> {
> fileinto "Spam";
> }
>
> Now I compile the script:
>
>> /usr/lib/cyrus-imapd/sievec spam-sieve.script spam-sieve.bc
>> chmod 600 spam-sieve.*
>> chown cyrus:mail spam-sieve.*
>
> I active this filter everytime I create a mailbox:
>
>> more active-filter.sh
> INITIAL=`echo $1 | cut -c1`
> NAME=`echo $1 | cut -f1 -d'.'`
> LASTNAME=`echo $1 | cut -f2 -d'.'`
> FULLNAME=`echo $NAME"^"$LASTNAME`
> cd /var/sieve/$INITIAL/
> mkdir $FULLNAME
> chown cyrus:mail $FULLNAME
> cd /var/sieve/$INITIAL/$FULLNAME/
> ln -s /usr/lib/cyrus-imapd/scripts/spam-sieve.bc defaultbc
> echo "Activated defaultbc filter to $FULLNAME"
>
> I hope that this helps you.
>
> - ANNA -
Thanks, but I don't think it does. First of all, I already have a
system with 12000+ accounts...
I'd like it to work just as a individual script, but in the global
scope. I've been searching both list archives and on Google, but no
good match so far. Maybe I'll have to modify my blacklist settings in
Amavis-new to accomplish this...
What I want to do is simply reject e-mail from certain accounts, and
send them a note that their mail was rejected. It could be done in
Amavis as well, if I just disable the auto-learning feature.
Anders.
>
>
> This may be the wrong list to ask in, if so, please point me to the
> right one.
>
> I'm wondering if there's a way to have a "global" sieve script that
> takes some action on ALL the hosted e-mail addresses on the system?
>
> Anders Norrbring
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>
>
More information about the Info-cyrus
mailing list