From d0eec33921ae64720348121b2b736ebdc5a1c593 Mon Sep 17 00:00:00 2001 From: H8H Date: Wed, 9 Jul 2014 21:38:52 +0200 Subject: [PATCH] Enabled Managesieve Plugins for Dovecot and Roundcube --- setup/managesieve.sh | 29 +++++++++++++++++++++++++++++ setup/start.sh | 9 ++++----- setup/webmail.sh | 2 +- 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100755 setup/managesieve.sh diff --git a/setup/managesieve.sh b/setup/managesieve.sh new file mode 100755 index 00000000..90646cfc --- /dev/null +++ b/setup/managesieve.sh @@ -0,0 +1,29 @@ +# Managesieve: Manage a user's sieve script collection. +####################################################### + +source setup/functions.sh # load our functions +source /etc/mailinabox.conf # load global vars +managesieveDir=$STORAGE_ROOT/mail/managesieve + +apt_install \ + dovecot-managesieved + +cat - > /etc/dovecot/conf.d/90-sieve.conf << EOF; +## +## Settings for the Sieve interpreter +## +plugin { + # The path to the user's main active script. If ManageSieve is used, this the + # location of the symbolic link controlled by ManageSieve. + sieve = $managesieveDir/%d/%n/.dovecot.sieve + + # Directory for :personal include scripts for the include extension. This + # is also where the ManageSieve service stores the user's scripts. + sieve_dir = $managesieveDir/%d/%n +} +EOF + +mkdir $managesieveDir +chown -R mail.mail $managesieveDir + +service dovecot restart diff --git a/setup/start.sh b/setup/start.sh index b66377a9..4b0ef4b1 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -186,6 +186,7 @@ EOF . setup/dkim.sh . setup/spamassassin.sh . setup/web.sh +. setup/managesieve.sh . setup/webmail.sh . setup/management.sh @@ -222,10 +223,8 @@ if [ -z "`tools/mail.py user`" ]; then echo "Okay. I'm about to set up $EMAIL_ADDR for you." fi - # Create the user's mail account. This will ask for a password if none was given above. - tools/mail.py user add $EMAIL_ADDR $EMAIL_PW - - # Create an alias to which we'll direct all automatically-created administrative aliases. - tools/mail.py alias add administrator@$PRIMARY_HOSTNAME $EMAIL_ADDR + tools/mail.py user add $EMAIL_ADDR $EMAIL_PW # will ask for password if none given + tools/mail.py alias add hostmaster@$PRIMARY_HOSTNAME $EMAIL_ADDR + tools/mail.py alias add postmaster@$PRIMARY_HOSTNAME $EMAIL_ADDR fi diff --git a/setup/webmail.sh b/setup/webmail.sh index 2b202625..f9698b04 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -62,7 +62,7 @@ cat - > /usr/local/lib/roundcubemail/config/config.inc.php <