<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Good afternoon all,<br><br>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:<br><br><a href="http://cyrusimap.web.cmu.edu/mediawiki/index.php/Cyrus_Sieve" target="_blank">http://cyrusimap.web.cmu.edu/mediawiki/index.php/Cyrus_Sieve</a><br><br><a href="http://oregonstate.edu/helpdocs/e-mail/onid-e-mail/modifying-your-email-filters-using-sieveshell" target="_blank">http://oregonstate.edu/helpdocs/e-mail/onid-e-mail/modifying-your-email-filters-using-sieveshell</a><br><br>So here is what I did:<br><br>[shawn@postoffice ~]$ sieveshell -u shawn localhost<br>connecting to localhost<br>Please enter your password: <br>> list<br>phpscript <- active script<br>> get phpscript phpscript.txt<br>> exit<br><br>[shawn@postoffice ~]$ more phpscript.txt <br># This script has been automatically generated by avelsieve<br># (Sieve Mail Filters Plugin for Squirrelmail)<br># Warning: If you edit this manually, then the changes will not <br># be reflected in the users' front-end!<br>#AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo5O3M6Njoic3<br>RyaW5nIjtzOjU6IjEuOS45Ijt9<br>#AVELSIEVE_CREATED1342104019<br>#AVELSIEVE_MODIFIED1351180357<br>require ["fileinto","envelope","reject","vacation","imapflags","relational","comparator-i;ascii-nume<br>ric","regex","notify"];<br>#START_SIEVE_RULEYTo1OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHl<br>wZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjExOiJYLVNwYW0tRmxhZyI7czo5OiJtYXRjaHR5cGUiO3M6MjoiaXMiO3M<br>6MTE6ImhlYWRlcm1hdGNoIjtzOjM6IllFUyI7fX1zOjQ6InR5cGUiO3M6MToiMSI7czo5OiJjb25kaXRpb24iO3M6MzoiYW5kIjt<br>zOjY6ImFjdGlvbiI7czoxOiI1IjtzOjY6ImZvbGRlciI7czoxMDoiSU5CT1guU1BBTSI7fQ%3D%3DEND_SIEVE_RULE<br>if header :is "X-Spam-Flag" "YES"<br>{<br>fileinto "INBOX.SPAM";<br>}<br><br><br>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:<br><br>require ["fileinto","envelope","reject","vacation","imapflags","relational","comparator-i;ascii-nume<br>ric","regex","notify"];<br>if exists "X-Spam-Flag" {<br> if header :contains "X-Spam-Flag" "YES"<br> {<br> fileinto "user.techsupport.SPAM";<br> stop;<br> }<br>}<br><br>then<br><br>[shawn@postoffice ~]$ sieveshell -u shawn localhost<br>connecting to localhost<br>Please enter your password: <br>> put phpscript.txt phpscript<br>> list<br>phpscript <- active script<br>> quit<br><br><br>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. <br><br>Any help is greatly appreciated, <br>Shawn<br><br><br><br><br><br><br><br><br><br><br><br><br><br>                                            </div></body>
</html>