Version: 1.12.2 (using KDE 4.3.2) OS: Linux Installed from: Ubuntu Packages The sieve validation (settings-->manage sieve scripts) reports the "setflag" command as invalid. This is part of RFC 5232 http://ietfreport.isoc.org/idref/rfc5232/
If it decides a script is invalid, it cannot be uploaded.
I am using dovecot's LDA Sieve (the newer version) http://wiki.dovecot.org/LDA/Sieve
I needed to put require ["imap4flags"] in my header. Validation happens at managesieve level, not kmail.