diff options
Diffstat (limited to 'extra/dovecot/dovecot.install')
-rw-r--r-- | extra/dovecot/dovecot.install | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/extra/dovecot/dovecot.install b/extra/dovecot/dovecot.install index 51d1509ee..ddec178a4 100644 --- a/extra/dovecot/dovecot.install +++ b/extra/dovecot/dovecot.install @@ -11,9 +11,9 @@ post_install() { fi if grep -q "^dovecot:" /etc/passwd 2> /dev/null ; then - usermod -s /sbin/nologin -c "Dovecot user" -d /var/run/dovecot/login -u 76 -g dovecot dovecot &> /dev/null + usermod -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot dovecot &> /dev/null else - useradd -s /sbin/nologin -c "Dovecot user" -d /var/run/dovecot/login -u 76 -g dovecot -m -r dovecot &> /dev/null + useradd -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot -r dovecot &> /dev/null fi # dovenull @@ -24,9 +24,9 @@ post_install() { fi if grep -q "^dovenull:" /etc/passwd 2> /dev/null ; then - usermod -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/run/dovecot/login -u 74 -g dovenull dovenull &> /dev/null + usermod -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull dovenull &> /dev/null else - useradd -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/run/dovecot/login -u 74 -g dovenull -m -r dovenull &> /dev/null + useradd -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull -r dovenull &> /dev/null fi # harden some permissions @@ -36,15 +36,19 @@ post_install() { # arg 1: the new package version # arg 2: the old package version post_upgrade() { - post_install $1 if [ "`vercmp $2 2.0.0`" -lt 0 ]; then # important upgrade notice echo "> IMPORTANT DOVECOT 2.0 UPGRADE NOTICE" echo "> ------------------------------------" echo "> see http://wiki2.dovecot.org/Upgrading/2.0" echo "> make sure, you convert the dovecot.conf file" - fi - + fi + if [ "`vercmp $2 2.0.13-2`" -lt 0 ]; then + # to remove no more existant usersdirs simply remove the dovecot users and let them recreate later + userdel dovecot &> /dev/null + userdel dovenull &> /dev/null + fi + post_install $1 } # arg 1: the old package version |