1 # arg 1: the new package version
4 # Make sure the group and user "dovecot"+"dovenull exists on this system and have the correct values
7 if grep -q "^dovecot:" /etc/group &> /dev/null ; then
8 groupmod -g 76 -n dovecot dovecot &> /dev/null
10 groupadd -g 76 dovecot &> /dev/null
13 if grep -q "^dovecot:" /etc/passwd 2> /dev/null ; then
14 usermod -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot dovecot &> /dev/null
16 useradd -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot -r dovecot &> /dev/null
20 if grep -q "^dovenull:" /etc/group &> /dev/null ; then
21 groupmod -g 74 -n dovenull dovenull &> /dev/null
23 groupadd -g 74 dovenull &> /dev/null
26 if grep -q "^dovenull:" /etc/passwd 2> /dev/null ; then
27 usermod -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull dovenull &> /dev/null
29 useradd -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull -r dovenull &> /dev/null
33 # arg 1: the new package version
34 # arg 2: the old package version
36 if [ "`vercmp $2 2.0.0`" -lt 0 ]; then
37 # important upgrade notice
38 echo "> IMPORTANT DOVECOT 2.0 UPGRADE NOTICE"
39 echo "> ------------------------------------"
40 echo "> see http://wiki2.dovecot.org/Upgrading/2.0"
41 echo "> make sure, you convert the dovecot.conf file"
43 if [ "`vercmp $2 2.0.13-2`" -lt 0 ]; then
44 # to remove no more existant usersdirs simply remove the dovecot users and let them recreate later
45 userdel dovecot &> /dev/null
46 userdel dovenull &> /dev/null
51 # arg 1: the old package version
53 userdel dovecot &> /dev/null
54 userdel dovenull &> /dev/null
55 groupdel dovecot &> /dev/null || /bin/true
56 groupdel dovenull &> /dev/null || /bin/true
57 rm -rf /var/run/dovecot/ &> /dev/null || /bin/true