Re: Creating sieve script with image attachements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

you need

require ["fileinto", "body"]

and Cyrus 2.3.0 or greater

Quoting Adam D <emlists@xxxxxxxxx>:

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@xxxxxxxxxxxxxxxxxxxx
Waechterstrasse 76
72074 Tuebingen

Attachment: smime.p7s
Description: S/MIME krytographische Unterschrift

----
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

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux