3 Replies Latest reply on Mar 26, 2013 1:27 AM by 831622

    Sieve filter body message

      Hi Oracle,
      I create an sieve filter as follow:

      if body :content_type "body/html" :contains :text "MAKE MONEY"
      discard; stop;

      When email in, out server, I received an problem email with content: Reason: Error in sieve filter: Body not listed in require clause prior to use around input line 41

      What's wrong with me?
        • 1. Re: Sieve filter body message

          I see a number of problems with you attempt :

          -> body sieve filtering is something of MS7.
          What version of Messaging Server are you using ? (imsimta version)

          -> you should start this filter with :

          require ["body"];

          -> the sieve body filtering is according RFC5173, and there is no such thing like ":content_type".
          A better attempt would be :
          if body :text :contains "MAKE MONEY"

          -> the first bracket after the if statement should be '{'

          All together, your filter should look more like this :

          require ["body"];
          if body :text :contains "MAKE MONEY"
          discard; stop;

          There are a few remarks left to be made :
          - to enable sieve filtering in the body part of mails, you will have to enable this.
          Put in the option.dat the following :


          This is mentioned here .
          Do not forget to [rebuild the config|https://wikis.oracle.com/display/CommSuite/About+MTA+Services+and+Configuration#AboutMTAServicesandConfiguration-CompilingtheMTAConfiguration] .

          - afaik. there are some limitations to this filtering method.
          Eg. The only body transforms supported are :raw and :text; :content is not supported
          I must admit I do not see this currently documented somewhere, but I will try to get his done.

          Cheers, Ben
          • 2. Re: Sieve filter body message
            The Sieve body extenstion restrictions are documented on this page :

            Cheers, Ben
            • 3. Re: Sieve filter body message
              Hi Ben,
              It's very helpfull, thank you so much.