automate sieve scripts

Jerry Pommer jpommer at bynari.net
Mon Sep 30 16:27:28 CEST 2013




-----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!



More information about the users mailing list