Creating sieve script with image attachements

Adam D emlists at gmail.com
Tue Oct 24 15:41:16 EDT 2006


Michael Menge wrote:
> Hi,
> 
> Content-Type filtering is done by the sieve body extenssion
> http://www.ietf.org/internet-drafts/draft-ietf-sieve-body-04.txt
> 
> You want to have a look at the examples unter 4.2
> 
> ---------------------------
> if body :content "audio/mp3" :contains "" {
>                 fileinto "jukebox";
> }
> --------------------------
> 

OK, I am understanding that the Content-Type is not a header; it is part of the body (MIME) in which sieve can not work with.  So, that makes sense with the above script when it uses 'body' than 'header'.  Now, knowing and understanding better that it is a MIME part message can sieve still put out the content-type of 'image/gif' from the body?  

When creating the script and since I use websieve to make managing scripts for sieve a bit easier this is the custom rule set where I can put my raw script but when I deviate from using 'header' to 'body' and 'contains' to 'content' it gives me this error:

Updatesieve Error: Cant' update script...
Returned Error: Putting script: script errors: line 21: syntax error, unexpected $undefined
You can click on your browser's Back button to go back and try your entry again.

With this script:

if body :content  "image/gif" "" {
     fileinto "system.2-mail.missed-spam";
}

I have gone in to the default script and changed it manually in the sieve directory but when I do it throws all the other scripts off created by websieve.  Before I used websieve I used to write all the scripts out by hand and but this way is much easier if the scripts work.  I don't know if this turns out to be a websieve issue and should be addressed on that mailing list or can I continue with the thread on this list?


Much thanks from everyone,

-Adam


More information about the Info-cyrus mailing list