Re: FW: Global Sieve script
Hi! The sieve scripts in global namespace don't work for any user unless that user explicitely includes the global sieve script in their own sieve script. You can't just create a global sieve script and expect it to apply for all your users; you're going to have to create a way to modify the sieve script of each user to include your global sieve script (should be easy with the excellent perl modules, see their documentation). And then there's always the option for your users to remove that include rule. For shared mailboxen, you can add an annotation. The name of the annotation is 'sieve' and the value is the name of the sieve script. See man Cyrus::IMAP::Admin, command mboxcfg, for how to add annotations. --Janne On Fri, Apr 19, 2013 at 12:14:22PM -0400, Shawn Bakhtiar wrote: Good morning, So.. in trying to figure this out this morning I did the following and was able to get mail filtered into techsupports SPAM folder, but I don't understand why the global sieve script does not do the same things Created the following sieve script file (sorry I just realized i have two requires with the same info at top :S): require [fileinto]; require fileinto; if exists X-Spam-Flag { if header :contains X-Spam-Flag NO { } else { fileinto user.techsupport.SPAM; stop; } } if header :contains From MAILER-DAEMON { fileinto INBOX.MAILER-DAEMON; } if header :contains From logwatch { fileinto INBOX.Server Logs; } if header :contains From root { fileinto INBOX.Server Logs; } then: prompt sieveshell -u techsupport localhost connecting to localhost Please enter your password: put techsupport.txt phpscript quit Now... the test emails are going into the right folder. Questions, should I not be able to add global sieve rules like such? prompt sieveshell localhost connecting to localhost Please enter your password: put techsupport.txt phpscript quit In my global sieve directory: /var/lib/imap/sieve/global I have the following three files lrwxrwxrwx 1 cyrus mail 12 2013-04-19 08:27 defaultbc - phpscript.bc -rw--- 1 cyrus mail 184 2013-04-19 08:26 phpscript.bc -rw--- 1 cyrus mail 194 2013-04-19 08:26 phpscript.script and the content of phpscript.script is: require fileinto; if exists X-Spam-Flag { if header :contains X-Spam-Flag NO { } else { fileinto user.techsupport.SPAM; stop; } } which is the one I created yesterday, and loaded using sieveshell. any help would be greatly appreciated. From: shashan...@hotmail.com To: info-cyrus@lists.andrew.cmu.edu Subject: Global Sieve script Date: Wed, 17 Apr 2013 16:56:07 -0400 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
FW: Global Sieve script
Good morning, So.. in trying to figure this out this morning I did the following and was able to get mail filtered into techsupports SPAM folder, but I don't understand why the global sieve script does not do the same things Created the following sieve script file (sorry I just realized i have two requires with the same info at top :S): require [fileinto]; require fileinto; if exists X-Spam-Flag { if header :contains X-Spam-Flag NO { } else { fileinto user.techsupport.SPAM; stop; } } if header :contains From MAILER-DAEMON { fileinto INBOX.MAILER-DAEMON; } if header :contains From logwatch { fileinto INBOX.Server Logs; } if header :contains From root { fileinto INBOX.Server Logs; } then: prompt sieveshell -u techsupport localhost connecting to localhost Please enter your password: put techsupport.txt phpscript quit Now... the test emails are going into the right folder. Questions, should I not be able to add global sieve rules like such? prompt sieveshell localhost connecting to localhost Please enter your password: put techsupport.txt phpscript quit In my global sieve directory: /var/lib/imap/sieve/global I have the following three files lrwxrwxrwx 1 cyrus mail 12 2013-04-19 08:27 defaultbc - phpscript.bc -rw--- 1 cyrus mail 184 2013-04-19 08:26 phpscript.bc -rw--- 1 cyrus mail 194 2013-04-19 08:26 phpscript.script and the content of phpscript.script is: require fileinto; if exists X-Spam-Flag { if header :contains X-Spam-Flag NO { } else { fileinto user.techsupport.SPAM; stop; } } which is the one I created yesterday, and loaded using sieveshell. any help would be greatly appreciated. From: shashan...@hotmail.com To: info-cyrus@lists.andrew.cmu.edu Subject: Global Sieve script Date: Wed, 17 Apr 2013 16:56:07 -0400 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 require fileinto; if exists X-Spam-Flag { if header :contains X-Spam-Flag NO { } else { fileinto user.techsupport.SPAM; stop; } } Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus
Global Sieve script
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
Re: Problem with included global sieve script when mailbox contains a dot
Can anyone comment on that ? We might be doing something wrong while settings our ACLs, but looking with wireshark at how cyradm I think we're fine and that there's really a bug in here. Thomas, Blue Mind. On Mon, Nov 19, 2012 at 8:39 PM, Thomas Cataldo tcata...@gmail.com wrote: Hi, I did some more research on my problem and tracked the problem down to this test in append.c (cyrus 2.4) : else if (!strcmp(flag[i], \\flagged)) { if (as-myrights ACL_WRITE) { // this test fails when mailbox is a.b@domain message_index.system_flags |= FLAG_FLAGGED; } } My problem is probably related to unixhierarchysep settings and the way ACLs are set, but the following patch fixes it : diff --git a/imap/append.c b/imap/append.c index d3c2bd4..b622dd1 100644 --- a/imap/append.c +++ b/imap/append.c @@ -160,12 +160,25 @@ int append_setup(struct appendstate *as, const char *name, { int r; struct quota q; +unsigned int pos; +size_t at_char; +char* fixed_acls; as-mailbox = NULL; r = mailbox_open_iwl(name, as-mailbox); if (r) return r; -as-myrights = cyrus_acl_myrights(auth_state, as-mailbox-acl); +fixed_acls = strdup(as-mailbox-acl); +syslog(LOG_ERR, before acls tweaks: %s\n, fixed_acls); +at_char = strcspn(fixed_acls, @); +for (pos=0; pos at_char; pos++) { + if (fixed_acls[pos] == '.') { + fixed_acls[pos] = '^'; + } +} +syslog(LOG_ERR, after acls tweaks: %s\n, fixed_acls); + +as-myrights = cyrus_acl_myrights(auth_state, fixed_acls); if ((as-myrights aclcheck) != aclcheck) { r = (as-myrights ACL_LOOKUP) ? The two logs I added give the following output : Nov 19 20:37:00 ppday cyrus/lmtp[42207]: before acls tweaks: a...@buffy.vmw #011lrswipkxtecda#011admin0#011lrswipkxtecda#011ad...@buffy.vmw #011lrsp#011 Nov 19 20:37:00 ppday cyrus/lmtp[42207]: after acls tweaks: a^b...@buffy.vmw #011lrswipkxtecda#011admin0#011lrswipkxtecda#011ad...@buffy.vmw #011lrsp#011 I hope this test patch might help figure out what is wrong. My acls setup or a bug. Regards, Thomas Cataldo, Blue Mind. On Wed, Nov 14, 2012 at 10:40 AM, Thomas Cataldo tcata...@gmail.comwrote: Hello, Consider the following sieve setup : root@ppday:/var/spool/sieve# cat global/buffy.vmw.sieve.script require [body, copy, fileinto, imapflags ]; # filters if allof ( address :contains from admin) { setflag \\Flagged; } # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/a/a^b/bm-user5.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/s/sp/bm-user6.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END When ad...@buffy.vmw sends an email to a...@buffy.vmw and s...@buffy.vmw, the following happens : - the mail is correctly flagged for sp - no flagging for a.b Nothing interesting in my logs when the mail is delivered : Nov 14 10:17:20 ppday cyrus/master[19560]: about to exec /usr/lib/cyrus/bin/lmtpd Nov 14 10:17:20 ppday cyrus/lmtp[19560]: executed Nov 14 10:17:20 ppday cyrus/lmtp[19560]: skiplist: checkpointed /var/lib/cyrus/statuscache.db (0 records, 144 bytes) in 0 seconds Nov 14 10:17:21 ppday cyrus/lmtp[19560]: accepted connection Nov 14 10:17:21 ppday cyrus/lmtp[19560]: connection from ppday.buffy.vmw [172.16.78.128] preauth'd as postman Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.a^b Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE a^b user: 0.004000 sys: 0.008000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.admin Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE admin user: 0.00 sys: 0.004000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.sp Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE sp user: 0.00 sys: 0.00 Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=a...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=ad...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=s...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/qmgr[20160]: 5DA0A21E37: removed Any know bugs with global sieve vs mailboxes with dot in them ? Can I enable more verbose
Re: Problem with included global sieve script when mailbox contains a dot
Sorry I haven't commented. Yes, I think you're right - it's a bug. I tried to fix something like it a while back and created more and worse bugs, so I reverted the change. The way that usernames and folder details are handled in sieve is a right mess... conversions backwards and forwards between internal and external namespaces. It's on the to look at before 2.5 list. I'm travelling at the moment, so I'm not spending as much time on Cyrus as I'd like :( I'd love anyone else who has time to take a look too... see if they can untangle the conversions! Bron. On Sun, Nov 25, 2012, at 11:31 AM, Thomas Cataldo wrote: Can anyone comment on that ? We might be doing something wrong while settings our ACLs, but looking with wireshark at how cyradm I think we're fine and that there's really a bug in here. Thomas, Blue Mind. On Mon, Nov 19, 2012 at 8:39 PM, Thomas Cataldo [1]tcata...@gmail.com wrote: Hi, I did some more research on my problem and tracked the problem down to this test in append.c (cyrus 2.4) : else if (!strcmp(flag[i], \\flagged)) { if (as-myrights ACL_WRITE) { // this test fails when mailbox is a.b@domain message_index.system_flags |= FLAG_FLAGGED; } } My problem is probably related to unixhierarchysep settings and the way ACLs are set, but the following patch fixes it : diff --git a/imap/append.c b/imap/append.c index d3c2bd4..b622dd1 100644 --- a/imap/append.c +++ b/imap/append.c @@ -160,12 +160,25 @@ int append_setup(struct appendstate *as, const char *name, { int r; struct quota q; +unsigned int pos; +size_t at_char; +char* fixed_acls; as-mailbox = NULL; r = mailbox_open_iwl(name, as-mailbox); if (r) return r; -as-myrights = cyrus_acl_myrights(auth_state, as-mailbox-acl); +fixed_acls = strdup(as-mailbox-acl); +syslog(LOG_ERR, before acls tweaks: %s\n, fixed_acls); +at_char = strcspn(fixed_acls, @); +for (pos=0; pos at_char; pos++) { + if (fixed_acls[pos] == '.') { + fixed_acls[pos] = '^'; + } +} +syslog(LOG_ERR, after acls tweaks: %s\n, fixed_acls); + +as-myrights = cyrus_acl_myrights(auth_state, fixed_acls); if ((as-myrights aclcheck) != aclcheck) { r = (as-myrights ACL_LOOKUP) ? The two logs I added give the following output : Nov 19 20:37:00 ppday cyrus/lmtp[42207]: before acls tweaks: a...@buffy.vmw#011lrswipkxtecda#011admin0#011lrswipkxtecda#011admin@buff y.vmw#011lrsp#011 Nov 19 20:37:00 ppday cyrus/lmtp[42207]: after acls tweaks: a^b...@buffy.vmw#011lrswipkxtecda#011admin0#011lrswipkxtecda#011admin@buff y.vmw#011lrsp#011 I hope this test patch might help figure out what is wrong. My acls setup or a bug. Regards, Thomas Cataldo, Blue Mind. On Wed, Nov 14, 2012 at 10:40 AM, Thomas Cataldo [2]tcata...@gmail.com wrote: Hello, Consider the following sieve setup : root@ppday:/var/spool/sieve# cat global/buffy.vmw.sieve.script require [body, copy, fileinto, imapflags ]; # filters if allof ( address :contains from admin) { setflag \\Flagged; } # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/a/a^b/bm-user5.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/s/sp/bm-user6.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END When ad...@buffy.vmw sends an email to a...@buffy.vmw and s...@buffy.vmw, the following happens : - the mail is correctly flagged for sp - no flagging for a.b Nothing interesting in my logs when the mail is delivered : Nov 14 10:17:20 ppday cyrus/master[19560]: about to exec /usr/lib/cyrus/bin/lmtpd Nov 14 10:17:20 ppday cyrus/lmtp[19560]: executed Nov 14 10:17:20 ppday cyrus/lmtp[19560]: skiplist: checkpointed /var/lib/cyrus/statuscache.db (0 records, 144 bytes) in 0 seconds Nov 14 10:17:21 ppday cyrus/lmtp[19560]: accepted connection Nov 14 10:17:21 ppday cyrus/lmtp[19560]: connection from ppday.buffy.vmw [172.16.78.128] preauth'd as postman Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.a^b Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE a^b user: 0.004000 sys: 0.008000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.admin Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE admin user: 0.00 sys: 0.004000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.sp Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE sp user: 0.00 sys: 0.00 Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=a...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery
Re: Problem with included global sieve script when mailbox contains a dot
Hi, I did some more research on my problem and tracked the problem down to this test in append.c (cyrus 2.4) : else if (!strcmp(flag[i], \\flagged)) { if (as-myrights ACL_WRITE) { // this test fails when mailbox is a.b@domain message_index.system_flags |= FLAG_FLAGGED; } } My problem is probably related to unixhierarchysep settings and the way ACLs are set, but the following patch fixes it : diff --git a/imap/append.c b/imap/append.c index d3c2bd4..b622dd1 100644 --- a/imap/append.c +++ b/imap/append.c @@ -160,12 +160,25 @@ int append_setup(struct appendstate *as, const char *name, { int r; struct quota q; +unsigned int pos; +size_t at_char; +char* fixed_acls; as-mailbox = NULL; r = mailbox_open_iwl(name, as-mailbox); if (r) return r; -as-myrights = cyrus_acl_myrights(auth_state, as-mailbox-acl); +fixed_acls = strdup(as-mailbox-acl); +syslog(LOG_ERR, before acls tweaks: %s\n, fixed_acls); +at_char = strcspn(fixed_acls, @); +for (pos=0; pos at_char; pos++) { + if (fixed_acls[pos] == '.') { + fixed_acls[pos] = '^'; + } +} +syslog(LOG_ERR, after acls tweaks: %s\n, fixed_acls); + +as-myrights = cyrus_acl_myrights(auth_state, fixed_acls); if ((as-myrights aclcheck) != aclcheck) { r = (as-myrights ACL_LOOKUP) ? The two logs I added give the following output : Nov 19 20:37:00 ppday cyrus/lmtp[42207]: before acls tweaks: a...@buffy.vmw #011lrswipkxtecda#011admin0#011lrswipkxtecda#011ad...@buffy.vmw#011lrsp#011 Nov 19 20:37:00 ppday cyrus/lmtp[42207]: after acls tweaks: a^b...@buffy.vmw #011lrswipkxtecda#011admin0#011lrswipkxtecda#011ad...@buffy.vmw#011lrsp#011 I hope this test patch might help figure out what is wrong. My acls setup or a bug. Regards, Thomas Cataldo, Blue Mind. On Wed, Nov 14, 2012 at 10:40 AM, Thomas Cataldo tcata...@gmail.com wrote: Hello, Consider the following sieve setup : root@ppday:/var/spool/sieve# cat global/buffy.vmw.sieve.script require [body, copy, fileinto, imapflags ]; # filters if allof ( address :contains from admin) { setflag \\Flagged; } # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/a/a^b/bm-user5.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/s/sp/bm-user6.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END When ad...@buffy.vmw sends an email to a...@buffy.vmw and s...@buffy.vmw, the following happens : - the mail is correctly flagged for sp - no flagging for a.b Nothing interesting in my logs when the mail is delivered : Nov 14 10:17:20 ppday cyrus/master[19560]: about to exec /usr/lib/cyrus/bin/lmtpd Nov 14 10:17:20 ppday cyrus/lmtp[19560]: executed Nov 14 10:17:20 ppday cyrus/lmtp[19560]: skiplist: checkpointed /var/lib/cyrus/statuscache.db (0 records, 144 bytes) in 0 seconds Nov 14 10:17:21 ppday cyrus/lmtp[19560]: accepted connection Nov 14 10:17:21 ppday cyrus/lmtp[19560]: connection from ppday.buffy.vmw [172.16.78.128] preauth'd as postman Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.a^b Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE a^b user: 0.004000 sys: 0.008000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.admin Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE admin user: 0.00 sys: 0.004000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.sp Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE sp user: 0.00 sys: 0.00 Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=a...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=ad...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=s...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/qmgr[20160]: 5DA0A21E37: removed Any know bugs with global sieve vs mailboxes with dot in them ? Can I enable more verbose sieve execution logs ? Regards, Thomas Cataldo, Blue Mind 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
Problem with included global sieve script when mailbox contains a dot
Hello, Consider the following sieve setup : root@ppday:/var/spool/sieve# cat global/buffy.vmw.sieve.script require [body, copy, fileinto, imapflags ]; # filters if allof ( address :contains from admin) { setflag \\Flagged; } # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/a/a^b/bm-user5.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END root@ppday:/var/spool/sieve# cat domain/b/buffy.vmw/s/sp/bm-user6.sieve.script require [body, copy, fileinto, imapflags, vacation, include ]; include :global buffy.vmw.sieve; # END When ad...@buffy.vmw sends an email to a...@buffy.vmw and s...@buffy.vmw, the following happens : - the mail is correctly flagged for sp - no flagging for a.b Nothing interesting in my logs when the mail is delivered : Nov 14 10:17:20 ppday cyrus/master[19560]: about to exec /usr/lib/cyrus/bin/lmtpd Nov 14 10:17:20 ppday cyrus/lmtp[19560]: executed Nov 14 10:17:20 ppday cyrus/lmtp[19560]: skiplist: checkpointed /var/lib/cyrus/statuscache.db (0 records, 144 bytes) in 0 seconds Nov 14 10:17:21 ppday cyrus/lmtp[19560]: accepted connection Nov 14 10:17:21 ppday cyrus/lmtp[19560]: connection from ppday.buffy.vmw [172.16.78.128] preauth'd as postman Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.a^b Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE a^b user: 0.004000 sys: 0.008000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.admin Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE admin user: 0.00 sys: 0.004000 Nov 14 10:17:21 ppday cyrus/lmtp[19560]: Delivered: 1c42d02ef8953cb95219dafba...@buffy.vmw to mailbox: buffy.vmw!user.sp Nov 14 10:17:21 ppday cyrus/lmtp[19560]: USAGE sp user: 0.00 sys: 0.00 Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=a...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=ad...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/lmtp[19551]: 5DA0A21E37: to=s...@buffy.vmw, relay=172.16.78.128[172.16.78.128]:2400, delay=0.93, delays=0.07/0.03/0.03/0.79, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK) Nov 14 10:17:21 ppday postfix/qmgr[20160]: 5DA0A21E37: removed Any know bugs with global sieve vs mailboxes with dot in them ? Can I enable more verbose sieve execution logs ? Regards, Thomas Cataldo, Blue Mind 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
How to include global sieve script for each user
Hi all, I know this is a recurring topic here, but after hours of searching I still can't get this to work. I'm running Cyrus 2.3.7 on FreeBSD 6.2, I have added a global script like this: sieveshell -u cyrus -a cyrus -e p spam.script spam localhost Which results in the script showing up in sieve/global/spam.{bc,script} Now I want to upload a user script, consisting of the following lines (as per RFC) require [include]; include :global spam; Which results in an 'unsupported feature at line 1' error. I found posts claiming that Cyrus does not advertise the include extension, but works anyhow. I also tried only the line include :global spam;, but then I get line 1: include not required. So what is the darn syntax, and why is cyrus documented so sparsely? Thanks in advance! Uli Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: How to include global sieve script for each user
Hi, you have to tell cyrus which extensions to use with the sieve_extensions: in /etc/imapd.conf Michael Menge Quoting Ulrich Spoerlein [EMAIL PROTECTED]: Hi all, I know this is a recurring topic here, but after hours of searching I still can't get this to work. I'm running Cyrus 2.3.7 on FreeBSD 6.2, I have added a global script like this: sieveshell -u cyrus -a cyrus -e p spam.script spam localhost Which results in the script showing up in sieve/global/spam.{bc,script} Now I want to upload a user script, consisting of the following lines (as per RFC) require [include]; include :global spam; Which results in an 'unsupported feature at line 1' error. I found posts claiming that Cyrus does not advertise the include extension, but works anyhow. I also tried only the line include :global spam;, but then I get line 1: include not required. So what is the darn syntax, and why is cyrus documented so sparsely? Thanks in advance! Uli Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html M.Menge Tel.: (49) 7071/29-70316 Universitaet Tuebingen Fax.: (49) 7071/29-5912 Zentrum fuer Datenverarbeitung mail: [EMAIL PROTECTED] Waechterstrasse 76 72074 Tuebingen smime.p7s Description: S/MIME krytographische Unterschrift Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: How to include global sieve script for each user
-- Ulrich Spoerlein [EMAIL PROTECTED] is rumored to have mumbled on 6. März 2007 16:39:31 +0100 regarding How to include global sieve script for each user: I know this is a recurring topic here, but after hours of searching I still can't get this to work. I'm running Cyrus 2.3.7 on FreeBSD 6.2, I have added a global script like this: sieveshell -u cyrus -a cyrus -e p spam.script spam localhost Which results in the script showing up in sieve/global/spam.{bc,script} Now I want to upload a user script, consisting of the following lines (as per RFC) require [include]; include :global spam; Which results in an 'unsupported feature at line 1' error. I found posts claiming that Cyrus does not advertise the include extension, but works anyhow. I also tried only the line include :global spam;, but then I get line 1: include not required. So what is the darn syntax, and why is cyrus documented so sparsely? From man imapd.conf: sieve_extensions: fileinto reject vacation imapflags notify envelope relational regex subaddress copy Space-separated list of Sieve extensions allowed to be used in sieve scripts, enforced at submission by timsieved(8). Any previ- ously installed script will be unaffected by this option and will continue to execute regardless of the extensions used. This option has no effect on options that are disabled at compile time (e.g. regex). Allowed values: fileinto, reject, vacation, imapflags, notify, include, envelope, body, relational, regex, subaddress, copy I.e. you have to explicitly enable include. Don't complain about missing documentation when you don't even bother to read it ... -- Sebastian Hagedorn - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10 Zentrum für angewandte Informatik - Universitätsweiter Service RRZK Universität zu Köln / Cologne University - Tel. +49-221-478-5587 pgpueGMGffY7c.pgp Description: PGP signature Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: How to include global sieve script for each user
Sebastian Hagedorn wrote: -- Ulrich Spoerlein [EMAIL PROTECTED] is rumored to have mumbled on 6. März 2007 From man imapd.conf: sieve_extensions: fileinto reject vacation imapflags notify envelope relational regex subaddress copy Space-separated list of Sieve extensions allowed to be used in sieve scripts, enforced at submission by timsieved(8). Any previ- ously installed script will be unaffected by this option and will continue to execute regardless of the extensions used. This option has no effect on options that are disabled at compile time (e.g. regex). Allowed values: fileinto, reject, vacation, imapflags, notify, include, envelope, body, relational, regex, subaddress, copy I.e. you have to explicitly enable include. Don't complain about missing documentation when you don't even bother to read it ... Sigh, since an unset sasl_mech_list has the meaning of all available I was under the impression, that it would be the same with sieve_extension. Thanks for the cluebat! Ulrich Spoerlein -- The trouble with the dictionary is you have to know how the word is spelled before you can look it up to see how it is spelled. -- Will Cuppy Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Global Sieve Script
En/na Federico Sevilla III ha escrit: Hi, I would like to create a global sieve script that will be active for all users, regardless of the presence of a per-user sieve script or not. This is so that all spam marked by amavis with the X-Spam-Status header can be segregated into spam folders. I just configure amavis (actually amavisd-new) to add the spam extension ($addr_extension_spam = 'spam'), and then give anonymous the p permission to the users' spam subfolders (the worst that can happen is if someone discovers the trick he can send mail directly to the spam folder). Bye -- Luca Olivetti Wetron Automatización S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007 Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Global Sieve Script
Hi, I would like to create a global sieve script that will be active for all users, regardless of the presence of a per-user sieve script or not. This is so that all spam marked by amavis with the X-Spam-Status header can be segregated into spam folders. I have already created and activated a script placed in the global namespace, but this doesn't seem to be run for all users (actually, it doesn't seem to be run for any users). Is my understanding of what a global script is correct? Or do global scripts still need to be included or otherwise referenced in per-user scripts? If anyone has a recipe for scripts that are activated for all users without requiring individual scripts in the users' sieve folders, please do share this. Thanks! (PS- would appreciate if I can be cc'd replies) -- Federico Sevilla III F S 3 Consulting Inc. http://www.fs3.ph Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Global Sieve Script
-- Federico Sevilla III [EMAIL PROTECTED] is rumored to have mumbled on 15. Dezember 2006 01:44:54 +0800 regarding Global Sieve Script: I would like to create a global sieve script that will be active for all users, regardless of the presence of a per-user sieve script or not. Can't be done. I have already created and activated a script placed in the global namespace, but this doesn't seem to be run for all users (actually, it doesn't seem to be run for any users). Is my understanding of what a global script is correct? No. Or do global scripts still need to be included Yes. -- Sebastian Hagedorn - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10 Zentrum für angewandte Informatik - Universitätsweiter Service RRZK Universität zu Köln / Cologne University - Tel. +49-221-478-5587 pgpfQsMfLSaDE.pgp Description: PGP signature Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Global sieve script
On Mon, Oct 25, 2004 at 12:32:26PM -0500 or thereabouts, Adi Linden wrote: Is it possible to have a global sieve script, like /etc/procmailrc, which is run before any users sieve scripts? If so, where does it live? Hi, sorry that I can't answer this question I only wanted to mention that I am very interested in this, too. One very important example would be this: placing emails' subject: or to: matching a couple of rules into one shared folder. I hope somebody can lighten this darkness :-) cu Sascha -- GNU Linux | Opinions are like assholes, everyone's got one, but nobody 2.6.7 | wants to look at the other guy's. -- Hal Hickman on a | i586 | | | --- 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
Re: Global sieve script
On Wed, Oct 27, 2004 at 06:55:01PM +0200, Sascha Wuestemann wrote: On Mon, Oct 25, 2004 at 12:32:26PM -0500 or thereabouts, Adi Linden wrote: Is it possible to have a global sieve script, like /etc/procmailrc, which is run before any users sieve scripts? If so, where does it live? sorry that I can't answer this question I only wanted to mention that I am very interested in this, too. Search the archives. Rob has documented this a few times. There's no easy way for users to edit it, but you can do this manually yourself. -- Joe Rhett Senior Geek Meer.net --- 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
Re: global sieve script?
Hello, My two cents worth on how to make it work. It would have to go through lmtpd twice. Terribly inefficient I'm sure, and I'll bet some people are cringing as we read. The first pass through is for the global sieve script(s). Handled on a per domain basis, or maybe for the server if you truly want it to be global, as for say, SPAM filtering or Virus checking, etc. If it makes it to the second pass it's just normal lmtpd delivery. There is no interaction per se, but there is a precedence, which really should go to the global filter, IMHO. That said, is this really something that postmasters want to start doing? You are messing with peoples email with a sieve script and have the potential to delete or redirect email that should be allowed to go to the user who may then decide. I'd bet that's been a reason that global filtering hasn't happened yet. Regards, Earl Shannon Edward Rudd wrote: nope.. It's not in there. Not sure when it will be either, as it's a little more involved than just adding it in to cyrus imapd.. one has to figure out how a global script will interact with a users local script, including having one override another. Which AFAIK is not documented in the RFC.. On Thu, 2004-03-04 at 17:22, Joe Hrbek wrote: This was posted in reference to a global sieve script: http://www.irbs.net/internet/info-cyrus/0112/0133.html It dates back to 2001. Is this capability now present in the latest cyrus package? I use simon matter's RPM. If so, this would be very cool. -j --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
RE: global sieve script?
I won't attempt to suggest any ideas to implement a global rule, but I do have some ideas about the use of such a feature. The reason I originally asked was to make my life a little easier. :) I have a group of users, about 250 that are restricted in who they can receive email from and who they can send email to. It's easy enough to restrict who they can email at the mta level, but the rest is more trouble than I'm willing to put up with, so I use sieve to filter who can receive what. It generates more email traffic, but I don't care, we don't have that much volume. I wrote some php scripts via php-cyradm that goes through the user mailboxes and updates the scripts automatically when I make a change, but I thought it would be awesome to have a file that held a list of mailboxes, and whenever a message was delivered to that mailbox, do some action. Of course, taking priority over whatever script the user had installed in his mailbox. This way I only need to edit one file instead of 250. :) Granted, my scripts work just fine for me, but it could be better. :) -j It would have to go through lmtpd twice. Terribly inefficient I'm sure, and I'll bet some people are cringing as we read. The first pass through is for the global sieve script(s). Handled on a per domain basis, or maybe for the server if you truly want it to be global, as for say, SPAM filtering or Virus checking, etc. If it makes it to the second pass it's just normal lmtpd delivery. There is no interaction per se, but there is a precedence, which really should go to the global filter, IMHO. That said, is this really something that postmasters want to start doing? You are messing with peoples email with a sieve script and have the potential to delete or redirect email that should be allowed to go to the user who may then decide. I'd bet that's been a reason that global filtering hasn't happened yet. Regards, Earl Shannon Edward Rudd wrote: nope.. It's not in there. Not sure when it will be either, as it's a little more involved than just adding it in to cyrus imapd.. one has to figure out how a global script will interact with a users local script, including having one override another. Which AFAIK is not documented in the RFC.. On Thu, 2004-03-04 at 17:22, Joe Hrbek wrote: This was posted in reference to a global sieve script: http://www.irbs.net/internet/info-cyrus/0112/0133.html It dates back to 2001. Is this capability now present in the latest cyrus package? I use simon matter's RPM. If so, this would be very cool. -j --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
RE: global sieve script?
Sounds like the Sieve Include extension is what you want. You could just have each users script include your admin script and go from there. The Include draft is pretty close to being done, and I already have an implementation floating around somewhere which will probably get put into CVS when the draft os finalized. That sounds awesome! I'll have to wait for it to get to the stable branch though. Thanks! :) -joe --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
global sieve script?
This was posted in reference to a global sieve script: http://www.irbs.net/internet/info-cyrus/0112/0133.html It dates back to 2001. Is this capability now present in the latest cyrus package? I use simon matter's RPM. If so, this would be very cool. -j --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: global sieve script?
Joe Hrbek wrote: This was posted in reference to a global sieve script: http://www.irbs.net/internet/info-cyrus/0112/0133.html It dates back to 2001. Is this capability now present in the latest cyrus package? I use simon matter's RPM. If so, this would be very cool. -j Sieve scripts are indeed stored in bytecode, compiled, form in Cyrus 2.2.3 (2.2.2 too? I dont recall), but the capability of a site-side Sieve script.. I will be interested in such a beast :) -- Sergio Devojno Bruder[EMAIL PROTECTED] http://haxent.com.br 41 362-5930, 41 9127-6620 --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Global sieve script
On Fri, 20 Jun 2003, Ramprasad A Padmanabhan wrote: Is it possible to execute in sieve a global script that will be common for all mailboxes. The default script for that mailbox should be executed after this common script Not currently. The sieve spec doesn't define how two scripts should interact together (especially in cases where, for example, one decides keep and one decides reject). There is currently a draft that discusses an include keyword to sieve, which can make this easier to comprehend, and perhaps possible to implement. -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper
Global Sieve script?
I'd love to set some site-wide policies using a Sieve script. Is it possible to create a Sieve script that is applied to every incoming mail to all users, which is run before per-user scripts (even for users without a script)? I guess at the moment that would be kinda slow, because scripts are reparsed on every delivery. Has anyone made any progress on that idea of parsing scripts once and storing a byte code?
Re: Global Sieve script?
On Tue, 11 Dec 2001, Jeremy Howard wrote: I guess at the moment that would be kinda slow, because scripts are reparsed on every delivery. Has anyone made any progress on that idea of parsing scripts once and storing a byte code? I'm currently working on this, but I probabally won't have anything finalized for another week or two. -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski | Andrew Systems Group * Cyert Hall 235 * 412-CMU-TREK | Cyrus SASL Developer, /usr/contributed Gatekeeper
Re: [info-cyrus] global sieve script
Cyrus IMAP doesn't have this capability as distributed, so you'll have to make some source code changes if you'd like it to happen. If we ever revisit how Sieve scripts are handled, I'll keep this in mind as a possible enhancement. Larry Date: Mon, 5 Feb 2001 15:32:04 +1100 From: Stephen Fischer [EMAIL PROTECTED] I would like to have each mail item run through a standard sieve script on delivery before being run through the individual user's script. Is this possible? I'm using cyrus 1.6.24 on solaris 8. Thanks, Stephen
Re: [info-cyrus] global sieve script
-- Stephen Fischer ([EMAIL PROTECTED]) wrote: I would like to have each mail item run through a standard sieve script on delivery before being run through the individual user's script. Is this possible? I'm using cyrus 1.6.24 on solaris 8. not a direct solution for your problem, just a hint. It is possible to put procmail between sendmail and cyrus (deliver) look out in the net for an artikel "blending cyrus imap with procmail" or something in ncworldmag. This solution is quite powerfull, central procmailscript (antispam) for every user but single procmail scripts (userdefined) as well. If you are interested and cannot find it, PM me, and ill give my archive a try. The trick is to call procmail out of sendmail, procmail itself calls deliver at the end. Thanks, Stephen greetings timo