EmailDiscussions.com

EmailDiscussions.com (http://www.emaildiscussions.com/index.php)
-   FastMail Forum (http://www.emaildiscussions.com/forumdisplay.php?f=27)
-   -   Can I use the regular "vacation" response feature if I have custom sieve rules? (http://www.emaildiscussions.com/showthread.php?t=72617)

Misha 4 Apr 2017 10:12 PM

Can I use the regular "vacation" response feature if I have custom sieve rules?
 
I have a bunch of custom sieve rules to sort my mail.

When I go offline for a few days, I always manually add some rules to do a vacation message.

Is this necessary? Could I just use the built-in vacation response tool? I somehow got the impression I could not, but it'd sure be nice if I could...

BritTim 4 Apr 2017 11:56 PM

There is no reason, in principle, why you cannot mix regular Rules and custom sieve. Indeed, facilitating this is a key part of the design. It is possible for your custom sieve to be written in such a way that the automatically generated vacation response code would not be reached, but this should not be an issue if your custom sieve is well structured.

jhollington 5 Apr 2017 12:24 AM

Yup, and in fact just to add a bit to what BritTim says, all the built-in vacation response tool actually does it insert automatically-generated sieve code. There's really nothing to it that's more magical than that.

Further, you'll actually be able to see the automatically-generated vacation rules mixed in with your normal sieve rules (along with any other automatically-generated rules). In about the third grey non-editable block you'll see a section that looks like this:

Code:

### 5. Sieve generated for vacation responses
# You do not have vacation responses enabled.

As that implies, any vacation responses you create will be inserted into this section as actual sieve rules. So any custom sieve rules you put above this section will run before your vacation responses, and anything you put below this section will run after.

FastMail's actually done a great job of incorporating all of this in the new UI. It used to be a lot more complicated and messy trying to mix automatically-generated rules and custom sieve.

Misha 11 Apr 2017 01:23 AM

Quote:

Originally Posted by jhollington (Post 601041)
FastMail's actually done a great job of incorporating all of this in the new UI. It used to be a lot more complicated and messy trying to mix automatically-generated rules and custom sieve.

Ah that makes sense. I've been using fastmail for a million years, and always hand-coding my vacation responses. I could not remember why. But maybe before the new UI, there was some reason I had to do this?

jhollington 11 Apr 2017 01:32 AM

Quote:

Originally Posted by Misha (Post 601159)
Ah that makes sense. I've been using fastmail for a million years, and always hand-coding my vacation responses. I could not remember why. But maybe before the new UI, there was some reason I had to do this?

Yup, it would have been the old interface I'm sure. I used to do the same thing. The automatically-generated rules always clobbered your custom sieve script — Fastmail would keep the text there, but comment it all out, so you'd have to mix the automatically-generated and custom rules back together manually, which was enough of a nuisance that it was far easier just to craft all of your rules by hand.

n5bb 11 Apr 2017 03:52 PM

Sieve improvements
 
Yes, it's now easy to mix custom sieve code with rules. And the standard rules are much more powerful, so custom sieve is not needed as often. For example, when reading a message you can use the More>Add rule from message feature to immediately create a new rule based on any message. This is an amazing feature, and I'm trying to remember to use it more often.

The recent improvements to the Fastmail sieve support allows a user to implement many features which were not previously available. For example, adding a date range to the vacation feature results in code similar to:
Code:

if   
  allof( 
  currentdate :zone "+0000" :value "ge" "iso8601" "2017-04-13T05:00:00Z", 
  currentdate :zone "+0000" :value "le" "iso8601" "2017-04-30T05:00:00Z" 
  )
{
... sieve ...
}

So you can add sieve code which affects how your rules are processed on different dates (and times). For example, you could automatically forward certain messages (or send a vacation style reply) only on weekdays after working hours and on weekends.

For details on the improvements, see this post:
Improvements to both sieve language support and rules system

Bill


All times are GMT +9. The time now is 07:02 AM.


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