Closed brevilo closed 9 months ago
This question pops up every not an then thus you find more details in the FAQ section: https://github.com/thsmi/sieve/wiki/FAQ---Sieve
The short answer is :
Sieve is specified that script never contains single CR or LF. And in case it contains a single CR or LF the server has to reject the script, editors are not allowed to create script containing single line breaks. Any automatic line-break conversion is not permitted.
So there is no point adding an option to export something in an non standard and invalid format.
In case you need to do any kind of dos2unix conversion, then your server is non standard compliant and incorrectly configured.
CRLF is not the "Windows line break" format, it is the one which was used on IBM and DEC machines. And thus it is used by almost all network protocols. Windows grant grant grant ancestors is IBM DOS, it used CRLF and thus windows does. The native linebreak format for MacOS is historically a CR not an LF.
Sieve is specified that script never contains single CR or LF. And in case it contains a single CR or LF the server has to reject the script, editors are not allowed to create script containing single line breaks. Any automatic line-break conversion is not permitted.
Thanks for the details, incl. the RFC reference. 👏
(Sorry I missed the FAQ entry. I did search the issues, though)
Prerequisites
Is your feature request related to a problem?
The editor seems to use the Windows line break format
CRLF
, even on macOS. Given that (most) mail servers presumably run on Linux, the sieve filter should be saved/exported using Linux line breaks, soLF
only, to not cause incompatibilities on the server due to the trailingCR
at the end of each line.Describe the solution you'd like
Add an option to save/export with Linux line break
LF
. Should probably be a server-specific option.Describe alternatives you've considered
Right now I'm manually running
dos2unix
on the mail server after I saved the filter in order to "fix" the file format.Thanks, and keep it up! Great work 🚀