Closed jeremyp3 closed 1 year ago
Hi Jeremy! Would you mind posting your sieve script to help me debug? Or a reduced version that exhibits the problem would work as well.
I don't see anything wrong with what you did :)
hello,
with this little sieve script, I have the problem.
I tried to delete the unnecessary requirements but I still have the problem. managesieve.txt
Very strange. It works for me on a mac using clang:
λ › cat managesieve.txt
require ["fileinto"];
# rule:[spam-flag]
if header :contains "X-Spam" "Yes" {
fileinto "Junk";
}
λ › ./check-sieve managesieve.txt
managesieve.txt: No errors found!
I will try to reproduce in a similar environment to yours. What are the versions of g++ and debian that you are running?
build.txt
hello,
debian 12
g++ 4:12.2.0-3
here is the result of my build in attachment
Ahh, I see the problem actually (I wasn't able to reproduce because I copy-pasted your sieve, but if I just use the file provided I can)-- looks like your sieve has CRLF line endings instead of Unix-style newlines.
Reading the spec, looks like this is something we should support.
I confirm, that everything works after changing the end of line type.
Thanks for the help and the future fix, I must admit that I didn't pay attention to this case when I proposed my file to him
This should be resolved on master. @jeremyp3 let me know if this fix doesn't work for you!
Hello,
I'm really sorry to post this problem, but I don't understand how it works
at this point, I get a response:
jeremy@jerem-debian:~/git/check-sieve (master) $ ./check-sieve /tmp/managesieve.sieve Errors found in "/tmp/managesieve.sieve":
invalid character On line 1: require ["fileinto","regex"]; ^ jeremy@jerem-debian:~/git/check-sieve (master) $
I think I'm forgetting something, but I don't see what :(
i've read the readme several times, but i must be missing something. i don't think i should care what's in the tests folder
thanks for the help !