EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 6 Jun 2019, 07:35 PM   #1
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
Sieve variable assignments - using a variable to set the same variable

Before I submit a ticket on this I thought I would bounce it off you guys. The problem is a variable set command to assign strings to sieve variables. Apparently you cannot set a variable where that variable is also used to supply the value to be set. Here's a simple illustration:

Code:
require ["fileinto", "variables"];

set "x" "1";
set "x" "${x}";       # x is set from itself but it doesn't work
fileinto "x = ${x}";  # expect "1" but get null

set "y" "1";
set "x" "${y}";       # x is set from a different variable
fileinto "x = ${x}" ; # expect 1 and get it
I wasn't actually doing this in real life. I was actually trying to concatenate two variables and assigning it to one of the variables used in the concatenation, i.e., set "x" "${x}${y}"; and I couldn't figure out why I only ended up with ${y}'s value. The above test case is a reduced simplified example illustrating the problem.

Note, if there is something in the standards addressing (variables rfc5229) this I'm missing it. To get around it I need to assign the variable I want to set to a temp variable to be used on the right side of the set.

By the way, I could envision a pretty brain dead parser where it sees the set "x" part of the statement and initializes x to null before continuing on parsing the value to be assigned to x. Can the (FM) sieve parse be that dumb?

Last edited by xyzzy : 6 Jun 2019 at 08:05 PM. Reason: tried to change the title
xyzzy is offline   Reply With Quote

Old 7 Jun 2019, 09:57 AM   #2
snappy
Junior Member
 
Join Date: Nov 2014
Posts: 8
Can you try setting a variable that isn't a numeric string, something like "foo"? The parsing code (which I assume what FM uses) seems to do something special with numbers: https://github.com/cyrusimap/cyrus-i.../grammar.c#L91

Edit: er nevemrind, that was to check if the variable reference identifier is a number.
snappy is offline   Reply With Quote
Old 8 Jun 2019, 02:13 AM   #3
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
In my original code they weren't numbers. I did that here only to simplify the example.

Also I've since noticed that in section 5 of rfc5229 ("Test string" ) there is an usage example where they use,

set "state" "${state} pending";

They wouldn't even be illustrating that construct at all there if it weren't supposed to be possible.

I submitted the ticket. Haven't heard back yet.
xyzzy is offline   Reply With Quote
Old 24 Jun 2019, 12:45 PM   #4
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
Well they found the bug. One guy says they have a fix. Another guy, who responds to all of my sieve bugs always says:

Quote:
Thanks for reporting. I've created a bug reported in our internal tool on this... Will let you know when the bug is fixed, but as I mentioned in the other ticket, please not that Sieve tester related issues are lower priority.
Which I read, "don't hold your bread this will be fixed any time soon".

I got the same response for a bug I spotted in vacation response when trying to verify why fcc is added to the require command. VR adds catchall aliases and duplicates the main account email address in the vacation command.

Also I submitted a ticket for addheader causing sieve tester to not report the filinto result. None of this stuff is going to be fixed. Just added to a black hole of things to do someday. There are always going to be higher priority bugs.

What's the point of having these tools if they aren't even going to support them?

I'm wondering if I should keep FM as my ESP. By coincidence my subscription ends this week. Not sure what I am going to do. Their ticket support is responsive (usually less than a week or two) but acting upon those tickets leaves a lot to be desired.

I'm a little mad (not the word I wanted to use but it got censored) at the moment.
xyzzy is offline   Reply With Quote
Old 25 Jun 2019, 01:15 AM   #5
cyberpear
Member
 
Join Date: Nov 2012
Posts: 40
There is a fix available since 12 days ago: https://github.com/cyrusimap/cyrus-i...7a0d366a72f385

Not sure how long it is until those make it into fastmail's production servers, though.
cyberpear is offline   Reply With Quote
Old 25 Jun 2019, 02:05 AM   #6
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
As I said they had found a fix for the variable assignment. But IMO it doesn't matter if they don't also fix sieve tester which apparently they have no interest in doing any time soon.
xyzzy is offline   Reply With Quote
Old 26 Jun 2019, 07:10 AM   #7
solenoid
Junior Member
 
Join Date: Oct 2010
Posts: 8
Given all the Sieve extensions they've been working on with the IETF, your conflating "low priority for reasons like keeping the business going" with "will not support" just seems silly.
solenoid is offline   Reply With Quote
Old 26 Jun 2019, 08:10 AM   #8
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
Quote:
Originally Posted by solenoid View Post
Given all the Sieve extensions they've been working on with the IETF, your conflating "low priority for reasons like keeping the business going" with "will not support" just seems silly.
That's your point of view. Keeping the business going is a never ending process and I include in that maintaining the tools they provide to their users.

Maybe if they stopped adding needless crap and stupid/aggravating changes to the UI they might have more resources to devote on the parts of the system that actually have known bugs and deficiencies.

And what are all these "sieve extensions" you are talking about? I am not tracking IETF. If they are adding any extensions to sieve (or planning to) then as far as I am concerned if they don't also add them to sieve tester they are useless (to me anyhow).

Last edited by xyzzy : 26 Jun 2019 at 08:40 AM.
xyzzy is offline   Reply With Quote
Old 26 Jun 2019, 10:00 AM   #9
solenoid
Junior Member
 
Join Date: Oct 2010
Posts: 8
No. It isn't merely my point of view. They demonstrably support it: with their limited resources, Fastmail employees are authoring IETF standards for Sieve and IMAP (You can easily look them up); they're just not providing support as quickly as you would like. For what we're paying, it's remarkable they're able to provide this level of service. I say this as someone who has crashed their Sieve engine with a regex—I recognize there are finite resources in this world and that they have to set engineering priorities.

At some point, the price has to go up. I think you're expecting too much.
solenoid is offline   Reply With Quote
Old 13 Jul 2019, 12:33 AM   #10
SideshowBob
Essential Contributor
 
Join Date: Jan 2017
Posts: 278
"I've created a bug reported in our internal tool on this... Will let you know when the bug is fixed, but as I mentioned in the other ticket, please not[e] that Sieve tester related issues are lower priority."

Does this bug occur only in sieve tester or does it apply to actually filtering? If it's the former I can see why it's a low priority. If it's the latter, are you sure that FM understands that?
SideshowBob is offline   Reply With Quote
Old 13 Jul 2019, 02:45 AM   #11
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 474
I can't remember how I initially ran into it now, i.e., just running sieve tester or testing the actual sieve code. Doesn't matter now since it was verified it was a sieve bug too. See post 5 above.
xyzzy is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 05:07 PM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy