Warning, /pim/libksieve/src/ksieveui/autocreatescripts/autotests/data/test-foreverypart-complex-ref.siv is written in an unsupported language. File is not indexed.
0001 require "foreverypart";
0002 require "reject";
0003 require "subaddress";
0004 require "fileinto";
0005 require "imap4flags";
0006
0007 # rule:[Script part 0]
0008 # Sieve filter
0009 # Declare the extensions used by this script.
0010
0011 # Messages bigger than 100K will be rejected with an error message
0012
0013 foreverypart :name "foo" {
0014 if size :over 100K
0015 {
0016 reject text:
0017 I'm sorry, I do not accept mail over 100kb in size.
0018 Please upload larger files to a server and send me a link.
0019 Thanks.
0020 .
0021 ;
0022
0023 } elsif address :all :is [ "From", "To" ] "mailinglist@blafasel.invalid"
0024 {
0025 fileinto "INBOX.mailinglist";
0026 } elsif anyof (not address :all :contains [ "To", "Cc", "Bcc" ] "me@blafasel.invalid"
0027 , header :matches "Subject" [ "*money*", "*Viagra*" ]
0028 )
0029 {
0030 fileinto "INBOX.spam";
0031 break;
0032 } else {
0033 keep;
0034 }
0035 }
0036