Creating sieve script with image attachements
Michael Menge
michael.menge at zdv.uni-tuebingen.de
Wed Oct 25 03:14:37 EDT 2006
Hi,
you need
require ["fileinto", "body"]
and Cyrus 2.3.0 or greater
Quoting Adam D <emlists at gmail.com>:
> 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
> ----
> 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:
michael.menge at zdv.uni-tuebingen.de
Waechterstrasse 76
72074 Tuebingen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5469 bytes
Desc: S/MIME krytographische Unterschrift
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20061025/a345ee2d/smime.bin
More information about the Info-cyrus
mailing list