automate sieve scripts
Jerry Pommer
jpommer at bynari.net
Mon Sep 30 19:00:28 CEST 2013
-----Original Message-----
From: "Geoff Nordli" <geoffn at gnaa.net>
Sent: September 30, 2013 4:30:58 PM UTC
To: users at lists.kolab.org
Cc:
Subject: Re: automate sieve scripts
On 13-09-30 07:27 AM, Jerry Pommer wrote:
> -----Original Message-----
> From: "Geoff Nordli" <geoffn at gnaa.net>
> Sent: September 29, 2013 4:58:28 AM UTC
> To: kolab-users at kolab.org
> Cc:
> Subject: automate sieve scripts
>
> I have a couple of users which go out of office every second friday.
>
> I would like to create a cronjob which automatically sets the OOF.
>
> Any ideas?
>
> thanks,
>
> Geoff
> _______________________________________________
> users mailing list
> users at lists.kolab.org
> https://lists.kolab.org/mailman/listinfo/users
>
>
> Geoff,
>
> You could compile a default script without the OOO message, and another with it, and have the cronjob remove and replace the "defaultbc" symbolic link to point to one or the other on his schedule.
>
> Or the more complicated route of keeping the source of both scripts and compiling and saving one or the other to the target file that the "defaultbc" symlink points to.
>
> # cron
> /kolab/bin/sievec out-of-office.script filter.bc
> /kolab/bin/sievec in-the-office.script filter.bc
>
> or compile them to different names and swap the symlink:
>
> /kolab/bin/sievec out-of-office.script out-of-office.bc
> /kolab/bin/sievec in-the-office.script in-the-office.bc
>
> #cron
> rm defaultbc; ln -s out-of-office.bc defaultbc # away message
> rm defaultbc; ln -s in-the-office.bc defaultbc # I'm back!
>
>
Hi Jerry.
Yes, I like this method the best and is what I tried initially, but I
didn't have any luck getting it working.
Once you compile the script, do you need a trigger to force the sieve
service to recognize it?
thanks,
Geoff
_______________________________________________
Geoff,
Not in my experience. As long as you compile it to the target of that symbolic link it should start working right away. Now, if you have a mistake in your script it could still appear to compile fine but quietly fail and appear that it isn't running at all.
More information about the users
mailing list