ietf-mta-filters
[Top] [All Lists]

draft-melnikov-sieve-imapflags-03.txt

2000-08-08 09:10:30
Alexey,

A couple nits/comments/questions on your latest draft:

Where's the page breaks and page headers?  :^)


   #
   # Example Sieve Filter
   # Declare any optional features or extension used by the script
   #
   require ["fileinto", "reject", "imapflags"];


Any reason why "reject" is required and mentioned below, but never used?


   #
   # Reject any large messages
   #
   if size :over 1M
           {
           if header :is "From" "boss(_at_)company(_dot_)com"
                      {
                      addflag "\\Flagged $Big";


This should be: addflag ["\\Flagged", "$Big"];


   # The message will be marked as "\Flagged $Big" when filed into mailbox 
"Big messages"
                      }
           fileinto "Big messages";
           }

   if header :is "From" "grandma(_at_)example(_dot_)net"
           {
           addflag ["\\Answered", "$MDNSent"];
   # If the message is bigger than 1Mb it will be marked as "\Flagged $Big 
\Answered $MDNSent" 


Unless I'm completely off the mark (and my cmu-sieve implementation is
incorrect), "\Flagged $Big" will never be set on these messages, because
these flags are only set 'if header :is "From" "boss(_at_)company(_dot_)com"'.  
I
think you want the first test in the script to be something like:

if size :over 1M
           {
           addflag "\\Flagged $Big";
           if header :is "From" "boss(_at_)company(_dot_)com"
                      {
   # The message will be marked as "\Flagged $Big" when filed into
mailbox "Big messages"
                      fileinto "Big messages";
                      }
           }


   # when filed into mailbox "grandma". If the message is shorter than 1Mb it 
will be marked as
   # "\Answered $MDNSent"
           fileinto "GrandMa";  # move to "GrandMa" folder
           }


Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp