Global Sieve script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good afternoon all,

I am trying to configure a global sieve script to move all incoming emails to a particular folder. According to the following link this should be a slam dunk:

http://cyrusimap.web.cmu.edu/mediawiki/index.php/Cyrus_Sieve

http://oregonstate.edu/helpdocs/e-mail/onid-e-mail/modifying-your-email-filters-using-sieveshell

So here is what I did:

[shawn@postoffice ~]$ sieveshell -u shawn localhost
connecting to localhost
Please enter your password:
> list
phpscript  <- active script
> get phpscript phpscript.txt
> exit

[shawn@postoffice ~]$ more phpscript.txt
# This script has been automatically generated by avelsieve
# (Sieve Mail Filters Plugin for Squirrelmail)
# Warning: If you edit this manually, then the changes will not
# be reflected in the users' front-end!
#AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo5O3M6Njoic3
RyaW5nIjtzOjU6IjEuOS45Ijt9
#AVELSIEVE_CREATED1342104019
#AVELSIEVE_MODIFIED1351180357
require ["fileinto","envelope","reject","vacation","imapflags","relational","comparator-i;ascii-nume
ric","regex","notify"];
#START_SIEVE_RULEYTo1OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHl
wZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjExOiJYLVNwYW0tRmxhZyI7czo5OiJtYXRjaHR5cGUiO3M6MjoiaXMiO3M
6MTE6ImhlYWRlcm1hdGNoIjtzOjM6IllFUyI7fX1zOjQ6InR5cGUiO3M6MToiMSI7czo5OiJjb25kaXRpb24iO3M6MzoiYW5kIjt
zOjY6ImFjdGlvbiI7czoxOiI1IjtzOjY6ImZvbGRlciI7czoxMDoiSU5CT1guU1BBTSI7fQ%3D%3DEND_SIEVE_RULE
if header :is "X-Spam-Flag" "YES"
{
fileinto  "INBOX.SPAM";
}


At this point I am a little baffled, since this should be moving all X-Spam-Flag that are YES into a folder INBOX.SPAM which does not exists at the top level (although I assume this means it should be filtered into each users individual SPAM folder). I am using Squirrelmail as a web based from end for my remote users and imagine the package manager must have installed this at some point. To simplify my life I re-wrote the script as:

require ["fileinto","envelope","reject","vacation","imapflags","relational","comparator-i;ascii-nume
ric","regex","notify"];
if exists "X-Spam-Flag" {
    if header :contains "X-Spam-Flag" "YES"
    {
    fileinto  "user.techsupport.SPAM";
    stop;
    }
}

then

[shawn@postoffice ~]$ sieveshell -u shawn localhost
connecting to localhost
Please enter your password:
> put phpscript.txt phpscript
> list
phpscript  <- active script
> quit


However, users are still receiving emails marked as SPAM in their inbox. What I am trying to do is make it so that any and all emails marked as SPAM are redirected to a single folder called SPAM in the techsupport users mail store.

Any help is greatly appreciated, 
Shawn













----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux