Script to add 'vacation' and 'forward' options to roundcubemail

I really like to have the ‘vacation’ option in roundcubemail - so as to set ‘out of office’ messages using a calendar.
So here’s a script to make those changes…
and a few others.

I added this to a new directory in /home/user-data/tools/ assuming it won’t be removed with and upgrade.
then $sudo chmod +x /home/user-data/tools/
and run with $sudo /home/user-data/tools/

# these are roundcube settings that I like to have
# - out of office / vacation filters (with the calendar stuff)
# - forwarding
# - always html
# - contacts from nextcloud by default
if [ -f '/usr/local/lib/roundcubemail/plugins/managesieve/' ]; then
    rm /usr/local/lib/roundcubemail/plugins/managesieve/
cp /usr/local/lib/roundcubemail/plugins/managesieve/ /usr/local/lib/roundcubemail/plugins/managesieve/

# set out-of-office / vacation
sed -i '/'managesieve_vacation'/'d /usr/local/lib/roundcubemail/plugins/managesieve/
echo "\$config['managesieve_vacation'] = 1;"  >> /usr/local/lib/roundcubemail/plugins/managesieve/

# set forwarding
sed -i '/'managesieve_forward'/'d /usr/local/lib/roundcubemail/plugins/managesieve/
echo "\$config['managesieve_forward'] = 1;"  >> /usr/local/lib/roundcubemail/plugins/managesieve/

# set vacation interval
sed -i '/'managesieve_vacation_interval'/'d /usr/local/lib/roundcubemail/plugins/managesieve/
echo "\$config['managesieve_vacation_interval'] = '1d';"  >> /usr/local/lib/roundcubemail/plugins/managesieve/

# set vacation address 
sed -i '/'managesieve_vacation_addresses_init'/'d /usr/local/lib/roundcubemail/plugins/managesieve/
echo "\$config['managesieve_vacation_addresses_init'] = 'true';"  >> /usr/local/lib/roundcubemail/plugins/managesieve/

#set vacation from 
sed -i '/'managesieve_vacation_from_init'/'d /usr/local/lib/roundcubemail/plugins/managesieve/
echo "\$config['managesieve_vacation_from_init'] = 'true';"  >> /usr/local/lib/roundcubemail/plugins/managesieve/


This topic was automatically closed after 61 days. New replies are no longer allowed.