Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 30 Nov 2016, Stephan Bosch wrote:

Op 30-11-2016 om 11:04 schreef Steven Mainor:


The main problem is that Sieve quoted strings are allowed to contain 
newlines, which means that a string doesn't necessarily end before the end of 
the line.


perl does display a comment in this case:

(Might be a runaway multi-line "" string starting on line 2)

I find this info very helpful.

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWD7OD3z1H7kL/d9rAQL8cgf+MfppUhPQrN+gPaNGfK/PZnqp0wv2G2ax
B9Ik5IkmjPuiQJkrdYOCEPRsibXKlEcG9Hzm99u0lYJMupMduFH7UoXE8Ve48Scz
YuFixqEccfkIsfy2HIIbtcE4IuhDFcvf6g6DaGPNSkJlDHqXqwLlyOHbznz9J1f7
HQBAbZRINJoX4GmfeiHPU3bg2GEBpzPTD6RWGio7lsNmQgH74QIQKJXC/y4EyB9P
XqQLjKt0b92n3QYsIKvM62CLZ2LqU3zwbWw/H7g/PY74xddTOXThldJVWHBw1RcL
RWDgdV2x8FEKO1nsOh8wyHfVTzltYIIMbk5pA+FZzQC6hCjSod2Ylw==
=za9p
-END PGP SIGNATURE-


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Giles Coochey



On 30/11/16 11:39, Steven Mainor wrote:

Hey Stephan,

Its okay I should have been able to spot that as many times as I read it. I 
feel very silly about it.

I just recently started using sieve but already I love how powerful it is.

Thanks,
Steven
An easy way to spot these types of errors is to use a context sensitive 
editor with highlighting, they can often highlight these issues and make 
them easier to spot.



--
Regards,

Giles Coochey
+44 (0) 7584 634 135
+44 (0) 1803 529 451
gi...@coochey.net




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Steven Mainor
Hey Stephan, 

Its okay I should have been able to spot that as many times as I read it. I 
feel very silly about it.

I just recently started using sieve but already I love how powerful it is. 

Thanks, 
Steven

On November 30, 2016 5:44:55 AM EST, Stephan Bosch  wrote:
>
>
>Op 30-11-2016 om 11:04 schreef Steven Mainor:
>> Hello Martin,
>>
>> Wow. That was indeed the problem. I have been staring at that small 
>> script for a week and I just couldn't see it. I even had a friend
>look 
>> at it and he couldn't find it either. I feel a bit ridiculous now.
>
>Making the handling/reporting of unterminated quoted strings better has
>
>been on my list for a while now. You're the first to actually complain 
>about it so far. :)
>
>The main problem is that Sieve quoted strings are allowed to contain 
>newlines, which means that a string doesn't necessarily end before the 
>end of the line.
>
>Regards,
>
>Stephan.
>
>>
>> On 11/30/2016 04:48 AM, Martin Wheldon wrote:
>>> Hi Steven,
>>>
>>> OK a on closer inspection :)
>>>
>>> You are missing a closing double quote on line 59:
>>>
 fileinto :create "Lists/Debain/News;
>>>
>>> should be:
>>>
>>> fileinto :create "Lists/Debain/News";
>>>
>>> Best Regards
>>>
>>> Martin
>>>
>>> On 2016-11-30 09:30, Steven Mainor wrote:
 Hey martin,

 Thanks for the reply! I made the changes you suggested but I got
>the
 same results.

 According to my understanding, #header "from" "per...@example.com"#
>is
 correct for an exact match.


 On 11/30/2016 04:10 AM, Martin Wheldon wrote:
> Hi Steven,
>
> I think you may be missing the :contains from the two header lines
>
> below:
>
>> if anyof (header "From" "store-n...@amazon.com",
>>  envelope :contains "From" "menswearhouse.com",
>>  envelope :contains "From" "officedepot.com",
>>  envelope :contains "From" "walgreens.com",
>>  header "From" "pr...@email.newegg.com") {
>> fileinto :create "Promo";
>> stop;
>
> if anyof (header :contains "From" "store-n...@amazon.com",
>   envelope :contains "From" "menswearhouse.com",
>   envelope :contains "From" "officedepot.com",
>   envelope :contains "From" "walgreens.com",
>   header :contains "From" "pr...@email.newegg.com") {
>  fileinto :create "Promo";
>  stop;
>
> Hope that helps
>
> Best Regards
>
> Martin
>
> On 2016-11-30 08:47, Steven Mainor wrote:
>> Hello! I hope you will forgive my ignorance but I have a problem
>I
>> have been trying to solve for a week and I'm not sure where else
>to
>> turn.
>>
>> I'm trying to write a sieve script to sort all of my mail. I was
>> writing this script to replace the one I am currently using but I
>> can't seem to get it to compile. I don't know a lot about sieve
>or
>> really scripting of any kind and I just can't figure out what I'm
>> doing wrong.
>>
>> The compiler just puts out a bunch of output that doesn't make
>sense.
>> like "unexpected character" when I know the character works there
>> because I am already running a script with some of the same
>lines.
>>
>> I'm attaching the script with some names and addresses changed
>and 
>> the
>> sieve output to this email.
>>
>> I would greatly appreciate any help anyone could offer.


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Stephan Bosch



Op 30-11-2016 om 11:04 schreef Steven Mainor:

Hello Martin,

Wow. That was indeed the problem. I have been staring at that small 
script for a week and I just couldn't see it. I even had a friend look 
at it and he couldn't find it either. I feel a bit ridiculous now.


Making the handling/reporting of unterminated quoted strings better has 
been on my list for a while now. You're the first to actually complain 
about it so far. :)


The main problem is that Sieve quoted strings are allowed to contain 
newlines, which means that a string doesn't necessarily end before the 
end of the line.


Regards,

Stephan.



On 11/30/2016 04:48 AM, Martin Wheldon wrote:

Hi Steven,

OK a on closer inspection :)

You are missing a closing double quote on line 59:


fileinto :create "Lists/Debain/News;


should be:

fileinto :create "Lists/Debain/News";

Best Regards

Martin

On 2016-11-30 09:30, Steven Mainor wrote:

Hey martin,

Thanks for the reply! I made the changes you suggested but I got the
same results.

According to my understanding, #header "from" "per...@example.com"# is
correct for an exact match.


On 11/30/2016 04:10 AM, Martin Wheldon wrote:

Hi Steven,

I think you may be missing the :contains from the two header lines 
below:



if anyof (header "From" "store-n...@amazon.com",
 envelope :contains "From" "menswearhouse.com",
 envelope :contains "From" "officedepot.com",
 envelope :contains "From" "walgreens.com",
 header "From" "pr...@email.newegg.com") {
fileinto :create "Promo";
stop;


if anyof (header :contains "From" "store-n...@amazon.com",
  envelope :contains "From" "menswearhouse.com",
  envelope :contains "From" "officedepot.com",
  envelope :contains "From" "walgreens.com",
  header :contains "From" "pr...@email.newegg.com") {
 fileinto :create "Promo";
 stop;

Hope that helps

Best Regards

Martin

On 2016-11-30 08:47, Steven Mainor wrote:

Hello! I hope you will forgive my ignorance but I have a problem I
have been trying to solve for a week and I'm not sure where else to
turn.

I'm trying to write a sieve script to sort all of my mail. I was
writing this script to replace the one I am currently using but I
can't seem to get it to compile. I don't know a lot about sieve or
really scripting of any kind and I just can't figure out what I'm
doing wrong.

The compiler just puts out a bunch of output that doesn't make sense.
like "unexpected character" when I know the character works there
because I am already running a script with some of the same lines.

I'm attaching the script with some names and addresses changed and 
the

sieve output to this email.

I would greatly appreciate any help anyone could offer.


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Steven Mainor

Hello Martin,

Wow. That was indeed the problem. I have been staring at that small 
script for a week and I just couldn't see it. I even had a friend look 
at it and he couldn't find it either. I feel a bit ridiculous now.



Thanks so much for your help,

Steven


On 11/30/2016 04:48 AM, Martin Wheldon wrote:

Hi Steven,

OK a on closer inspection :)

You are missing a closing double quote on line 59:


fileinto :create "Lists/Debain/News;


should be:

fileinto :create "Lists/Debain/News";

Best Regards

Martin

On 2016-11-30 09:30, Steven Mainor wrote:

Hey martin,

Thanks for the reply! I made the changes you suggested but I got the
same results.

According to my understanding, #header "from" "per...@example.com"# is
correct for an exact match.


On 11/30/2016 04:10 AM, Martin Wheldon wrote:

Hi Steven,

I think you may be missing the :contains from the two header lines 
below:



if anyof (header "From" "store-n...@amazon.com",
 envelope :contains "From" "menswearhouse.com",
 envelope :contains "From" "officedepot.com",
 envelope :contains "From" "walgreens.com",
 header "From" "pr...@email.newegg.com") {
fileinto :create "Promo";
stop;


if anyof (header :contains "From" "store-n...@amazon.com",
  envelope :contains "From" "menswearhouse.com",
  envelope :contains "From" "officedepot.com",
  envelope :contains "From" "walgreens.com",
  header :contains "From" "pr...@email.newegg.com") {
 fileinto :create "Promo";
 stop;

Hope that helps

Best Regards

Martin

On 2016-11-30 08:47, Steven Mainor wrote:

Hello! I hope you will forgive my ignorance but I have a problem I
have been trying to solve for a week and I'm not sure where else to
turn.

I'm trying to write a sieve script to sort all of my mail. I was
writing this script to replace the one I am currently using but I
can't seem to get it to compile. I don't know a lot about sieve or
really scripting of any kind and I just can't figure out what I'm
doing wrong.

The compiler just puts out a bunch of output that doesn't make sense.
like "unexpected character" when I know the character works there
because I am already running a script with some of the same lines.

I'm attaching the script with some names and addresses changed and the
sieve output to this email.

I would greatly appreciate any help anyone could offer.


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Martin Wheldon

Hi Steven,

OK a on closer inspection :)

You are missing a closing double quote on line 59:


fileinto :create "Lists/Debain/News;


should be:

fileinto :create "Lists/Debain/News";

Best Regards

Martin

On 2016-11-30 09:30, Steven Mainor wrote:

Hey martin,

Thanks for the reply! I made the changes you suggested but I got the
same results.

According to my understanding, #header "from" "per...@example.com"# is
correct for an exact match.


On 11/30/2016 04:10 AM, Martin Wheldon wrote:

Hi Steven,

I think you may be missing the :contains from the two header lines 
below:



if anyof (header "From" "store-n...@amazon.com",
 envelope :contains "From" "menswearhouse.com",
 envelope :contains "From" "officedepot.com",
 envelope :contains "From" "walgreens.com",
 header "From" "pr...@email.newegg.com") {
fileinto :create "Promo";
stop;


if anyof (header :contains "From" "store-n...@amazon.com",
  envelope :contains "From" "menswearhouse.com",
  envelope :contains "From" "officedepot.com",
  envelope :contains "From" "walgreens.com",
  header :contains "From" "pr...@email.newegg.com") {
 fileinto :create "Promo";
 stop;

Hope that helps

Best Regards

Martin

On 2016-11-30 08:47, Steven Mainor wrote:

Hello! I hope you will forgive my ignorance but I have a problem I
have been trying to solve for a week and I'm not sure where else to
turn.

I'm trying to write a sieve script to sort all of my mail. I was
writing this script to replace the one I am currently using but I
can't seem to get it to compile. I don't know a lot about sieve or
really scripting of any kind and I just can't figure out what I'm
doing wrong.

The compiler just puts out a bunch of output that doesn't make sense.
like "unexpected character" when I know the character works there
because I am already running a script with some of the same lines.

I'm attaching the script with some names and addresses changed and 
the

sieve output to this email.

I would greatly appreciate any help anyone could offer.


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Steven Mainor

Hey martin,

Thanks for the reply! I made the changes you suggested but I got the 
same results.


According to my understanding, #header "from" "per...@example.com"# is 
correct for an exact match.



On 11/30/2016 04:10 AM, Martin Wheldon wrote:

Hi Steven,

I think you may be missing the :contains from the two header lines below:


if anyof (header "From" "store-n...@amazon.com",
 envelope :contains "From" "menswearhouse.com",
 envelope :contains "From" "officedepot.com",
 envelope :contains "From" "walgreens.com",
 header "From" "pr...@email.newegg.com") {
fileinto :create "Promo";
stop;


if anyof (header :contains "From" "store-n...@amazon.com",
  envelope :contains "From" "menswearhouse.com",
  envelope :contains "From" "officedepot.com",
  envelope :contains "From" "walgreens.com",
  header :contains "From" "pr...@email.newegg.com") {
 fileinto :create "Promo";
 stop;

Hope that helps

Best Regards

Martin

On 2016-11-30 08:47, Steven Mainor wrote:

Hello! I hope you will forgive my ignorance but I have a problem I
have been trying to solve for a week and I'm not sure where else to
turn.

I'm trying to write a sieve script to sort all of my mail. I was
writing this script to replace the one I am currently using but I
can't seem to get it to compile. I don't know a lot about sieve or
really scripting of any kind and I just can't figure out what I'm
doing wrong.

The compiler just puts out a bunch of output that doesn't make sense.
like "unexpected character" when I know the character works there
because I am already running a script with some of the same lines.

I'm attaching the script with some names and addresses changed and the
sieve output to this email.

I would greatly appreciate any help anyone could offer.


Re: Sieve script won't compile. Compiler output isn't helpful.

2016-11-30 Thread Martin Wheldon

Hi Steven,

I think you may be missing the :contains from the two header lines 
below:



if anyof (header "From" "store-n...@amazon.com",
 envelope :contains "From" "menswearhouse.com",
 envelope :contains "From" "officedepot.com",
 envelope :contains "From" "walgreens.com",
 header "From" "pr...@email.newegg.com") {
fileinto :create "Promo";
stop;


if anyof (header :contains "From" "store-n...@amazon.com",
  envelope :contains "From" "menswearhouse.com",
  envelope :contains "From" "officedepot.com",
  envelope :contains "From" "walgreens.com",
  header :contains "From" "pr...@email.newegg.com") {
 fileinto :create "Promo";
 stop;

Hope that helps

Best Regards

Martin

On 2016-11-30 08:47, Steven Mainor wrote:

Hello! I hope you will forgive my ignorance but I have a problem I
have been trying to solve for a week and I'm not sure where else to
turn.

I'm trying to write a sieve script to sort all of my mail. I was
writing this script to replace the one I am currently using but I
can't seem to get it to compile. I don't know a lot about sieve or
really scripting of any kind and I just can't figure out what I'm
doing wrong.

The compiler just puts out a bunch of output that doesn't make sense.
like "unexpected character" when I know the character works there
because I am already running a script with some of the same lines.

I'm attaching the script with some names and addresses changed and the
sieve output to this email.

I would greatly appreciate any help anyone could offer.