[Dovecot] How to do line breaks in sieve scripts?

CJ Keist cj.keist at colostate.edu
Fri Aug 8 17:37:11 EEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephan,
   Thank you, didn't realize how buggy the libphp-sieve was.  It does
compile fine with sievec.


Stephan Bosch wrote:
> CJ Keist wrote:
>> In working with auto vacation replies I'd like to do a sieve script as
>> follows:
>>
>> require ["vacation"];
>> vacation
>> :days 30
>> :addresses "cj.keist at colostate.edu"
>> :subject "Out of Office"
>> "***************** Out of Office ******************
>>
>> I'm away -- send mail to foo in my absence
>>
>> ***************************************************";
>>
>>
>> But the libsieve-php.sourceforge.net check site doesn't like the line
>> breaks.  Is there a way to do line breaks in sieve scripting?
>> I've tried "\" at the end of the lines but that didn't work.
> Actually, the libsieve-php is wrong.
> 
> From RFC 5228 Section 8.1 (http://tools.ietf.org/html/rfc5228):
> 
>  quoted-safe        = CRLF / octet-not-qspecial
>                           ; either a CRLF pair, OR a single octet other
>                           ; than NUL, CR, LF, double-quote, or backslash
>  quoted-text        = *(quoted-safe / quoted-special / quoted-other)
>  quoted-string      = DQUOTE quoted-text DQUOTE
> 
> So, presuming that the lines end in CRLF and not just LF (on this part
> the RFC is too strict in my opinion), your script is valid (I verified).
> You can probably work around this bug using a literal string:
> 
> require ["vacation"];
> vacation
> :days 30
> :addresses "cj.keist at colostate.edu"
> :subject "Out of Office" text:
> ****************** Out of Office ******************
> 
>  I'm away -- send mail to foo in my absence
> 
> ***************************************************
> .
> ;
> 
> Or use the sievec binary to (test-) compile your sieve scripts.
> 
> Regards,
> 
> Stephan
> 

- --
C. J. Keist                     Email: cj.keist at colostate.edu
UNIX/Network Manager            Phone: 970-491-0630
Engineering Network Services    Fax:   970-491-5569
College of Engineering, CSU
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFInFoXA29OFr7C6jcRAlZpAJ9fhgKiVyoAzC2jUo22k+ItoyFO5QCg2Lyx
hifGvi1kwbZ6uFsfAd9WxVs=
=6cnM
-----END PGP SIGNATURE-----


More information about the dovecot mailing list