wok-6.x rev 24498
updated dovecot (2.3.9.2 -> 2.3.18)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 19 16:47:19 2022 +0100 (2022-02-19) |
parents | 34e801e0eb52 |
children | f1a6bc62bdf4 |
files | dovecot/description.txt dovecot/receipt dovecot/stuff/init.d/dovecot |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dovecot/description.txt Sat Feb 19 16:47:19 2022 +0100 1.3 @@ -0,0 +1,5 @@ 1.4 +Dovecot is an open source IMAP and POP3 email server for Linux 1.5 +and UNIX-like systems, written with security primarily in mind. 1.6 +Dovecot is an excellent choice for both small and large installations. 1.7 +It's fast, simple to set up, requires no special administration and 1.8 +it uses very little memory.
2.1 --- a/dovecot/receipt Sat Feb 19 14:19:02 2022 +0000 2.2 +++ b/dovecot/receipt Sat Feb 19 16:47:19 2022 +0100 2.3 @@ -1,7 +1,7 @@ 2.4 # SliTaz package receipt. 2.5 2.6 PACKAGE="dovecot" 2.7 -VERSION="2.3.9.2" 2.8 +VERSION="2.3.18" 2.9 CATEGORY="network" 2.10 SHORT_DESC="Dovecot IMAP and POP3 Server." 2.11 MAINTAINER="l.lemarinel@gmail.com" 2.12 @@ -12,8 +12,9 @@ 2.13 WGET_URL="https://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL" 2.14 2.15 DEPENDS="libcap libmysqlclient libssl openldap pam postgresql" 2.16 -BUILD_DEPENDS="libcap-dev libmysqlclient mysql-dev openldap-dev 2.17 - openssl-dev pam-dev postgresql-dev sqlite-dev" 2.18 +BUILD_DEPENDS="libcap-dev libmysqlclient libpostgresqlclient 2.19 + mysql-dev openldap-dev openssl-dev pam-dev 2.20 + postgresql-dev sqlite-dev" 2.21 2.22 # What is the latest version available today? 2.23 current_version() 2.24 @@ -27,7 +28,7 @@ 2.25 { 2.26 ./configure \ 2.27 --prefix=/usr \ 2.28 - --sysconfdir=/etc/dovecot \ 2.29 + --sysconfdir=/etc \ 2.30 --localstatedir=/var \ 2.31 --libexecdir=/usr/lib/$PACKAGE \ 2.32 --with-ldap=plugin \ 2.33 @@ -38,55 +39,49 @@ 2.34 --with-ssl=openssl \ 2.35 $CONFIGURE_ARGS && 2.36 make && 2.37 - make DESTDIR=$DESTDIR install 2.38 - 2.39 + make install DESTDIR=$DESTDIR 2.40 } 2.41 2.42 # Rules to gen a SliTaz package suitable for Tazpkg. 2.43 genpkg_rules() 2.44 { 2.45 + mkdir -p $fs/etc/ssl/misc 2.46 mkdir -p $fs/usr/lib 2.47 mkdir -p $fs/var/log/dovecot 2.48 - mkdir -p $fs/etc/ssl/misc 2.49 2.50 - cp -a $install/usr/sbin $fs/usr 2.51 - cp -a $install/usr/bin $fs/usr 2.52 - cp -a $install/usr/lib $fs/usr 2.53 - cp -a $install/etc $fs 2.54 - 2.55 - cp -pa $stuff/init.d $fs/etc 2.56 + cp -a $install/etc $fs 2.57 + cp -a $install/usr/bin $fs/usr 2.58 + cp -a $install/usr/lib $fs/usr 2.59 + cp -a $install/usr/sbin $fs/usr 2.60 2.61 - #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf 2.62 + cp -pa $stuff/init.d $fs/etc 2.63 cp -pa $install/usr/share/doc/dovecot/example-config/* \ 2.64 - $fs/etc/dovecot/ 2.65 - #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d 2.66 - #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d 2.67 - cp -pa $src/doc/*.cnf $fs/etc/ssl 2.68 - cp -pa $src/doc/mkcert.sh \ 2.69 - $fs/etc/ssl/misc/dovmkcert.sh 2.70 + $fs/etc/dovecot 2.71 + cp -pa $src/doc/*.cnf $fs/etc/ssl 2.72 + cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh 2.73 2.74 # Remove archive files *.*a 2.75 - find $fs -name "*.*a" -exec rm -f {} \; 2.76 - 2.77 + find $fs -name "*.*a" -exec rm -f {} \; 2.78 + 2.79 # Fix permissions 2.80 - chmod 755 $fs/etc/ssl/misc/* 2.81 + chmod 755 $fs/etc/ssl/misc/* 2.82 2.83 # Customising configuration. 2.84 - sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \ 2.85 - $fs/etc/dovecot/conf.d/10-master.conf 2.86 + sed -i -e "s|^#default_vsz_limit.*|default_vsz_limit = 50M|" \ 2.87 + $fs/etc/dovecot/conf.d/10-master.conf 2.88 2.89 - sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \ 2.90 - $fs/etc/dovecot/conf.d/10-logging.conf 2.91 - 2.92 - sed -i -e "s/^#listen.*/listen = */" \ 2.93 - $fs/etc/dovecot/dovecot.conf 2.94 + sed -i -e "s|^#log_path =.*|log_path = /var/log/dovecot/dovecot.log|" \ 2.95 + $fs/etc/dovecot/conf.d/10-logging.conf 2.96 + 2.97 + sed -i -e "s|^#listen.*|listen = *|" \ 2.98 + $fs/etc/dovecot/dovecot.conf 2.99 2.100 # Unsafe, see CVE-2014-3566 POODLE 2.101 - sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \ 2.102 - $fs/etc/dovecot/conf.d/10-ssl.conf 2.103 + sed -i -e "s|^#ssl_protocols =.*|ssl_protocols = !SSLv2 !SSLv3|" \ 2.104 + $fs/etc/dovecot/conf.d/10-ssl.conf 2.105 } 2.106 2.107 -#nd post install commands for Tazpkg. 2.108 +# Post install commands for Tazpkg. 2.109 post_install() 2.110 { 2.111 local user 2.112 @@ -98,7 +93,7 @@ 2.113 if ! grep -q $user "$1/etc/passwd" 2.114 then 2.115 echo 2.116 - echo -n "Adding user/group $user..." 2.117 + echo -n "Adding user and group $user..." 2.118 chroot "$1/" addgroup -g 76 -S $group 2.119 chroot "$1/" adduser -u 76 -S -D -H -G $group $user 2.120 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull 2.121 @@ -108,6 +103,10 @@ 2.122 # Set permissions for files and directories 2.123 chroot "$1/" chown -R ${user}.${group} /var/log/${user} \ 2.124 2.125 + # Create certificate, if neccessary 2.126 + [ -f "$1/etc/ssl/certs/dovecot.pem" ] || 2.127 + chroot "$1/" sh -c 'cd etc/ssl; ./misc/dovmkcert.sh' 2.128 + 2.129 cat <<EOF 2.130 ---- 2.131 To start $PACKAGE server you can run : 2.132 @@ -119,14 +118,14 @@ 2.133 EOF 2.134 } 2.135 2.136 - 2.137 +# Post remove commands for Tazpkg. 2.138 post_remove() 2.139 { 2.140 - echo "Removing stalled files..." 2.141 + echo "Removing obsolete files..." 2.142 test -d "$1/var/log/dovecot" && rm -rf "$1/var/log/dovecot" 2.143 test -d "$1/var/run/dovecot" && rm -rf "$1/var/run/dovecot" 2.144 2.145 - echo "Removing user/group daemon" 2.146 + echo "Removing user and group dovecot" 2.147 chroot "$1/" deluser dovecot 2.148 chroot "$1/" deluser dovenull 2.149 }
3.1 --- a/dovecot/stuff/init.d/dovecot Sat Feb 19 14:19:02 2022 +0000 3.2 +++ b/dovecot/stuff/init.d/dovecot Sat Feb 19 16:47:19 2022 +0100 3.3 @@ -1,8 +1,8 @@ 3.4 #!/bin/sh 3.5 -# /etc/init.d/dovecot : Start, stop and restart Dovecotserver on SliTaz, at 3.6 -# boot time or with the command line. 3.7 +# /etc/init.d/dovecot : Start, stop and restart dovecot server on SliTaz, 3.8 +# at boot time or with the command line. 3.9 # 3.10 -# To start SSH server at boot time, just put dovecot in the $RUN_DAEMONS 3.11 +# To start dovecot server at boot time, just put dovecot in the $RUN_DAEMONS 3.12 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf 3.13 # 3.14 . /etc/init.d/rc.functions 3.15 @@ -11,48 +11,53 @@ 3.16 NAME=dovecot 3.17 DESC="$(_ '%s daemon' Dovecot)" 3.18 DAEMON=/usr/sbin/dovecot 3.19 -OPTIONS=$dovecot_OPTIONS 3.20 +OPTIONS=$DOVECOT_OPTIONS 3.21 PIDFILE=/var/run/dovecot/master.pid 3.22 3.23 -if [ ! -d /var/run/dovecot ]; then 3.24 +if [ ! -d /var/run/dovecot ] 3.25 + then 3.26 mkdir -p /var/run/dovecot 3.27 chown dovecot.dovecot /var/run/dovecot 3.28 fi 3.29 + 3.30 case "$1" in 3.31 - start) 3.32 - if active_pidfile $PIDFILE dovecot ; then 3.33 - _ '%s is already running.' $NAME 3.34 - exit 1 3.35 - fi 3.36 - action 'Starting %s: %s...' "$DESC" $NAME 3.37 - $DAEMON $OPTIONS 3.38 - status 3.39 - ;; 3.40 - stop) 3.41 - if ! active_pidfile $PIDFILE dovecot ; then 3.42 - _ '%s is not running.' $NAME 3.43 - exit 1 3.44 - fi 3.45 - action 'Stopping %s: %s...' "$DESC" $NAME 3.46 - kill $(cat $PIDFILE) 3.47 - status 3.48 - ;; 3.49 - restart) 3.50 - if ! active_pidfile $PIDFILE dovecot ; then 3.51 - _ '%s is not running.' $NAME 3.52 - exit 1 3.53 - fi 3.54 - action 'Restarting %s: %s...' "$DESC" $NAME 3.55 - kill $(cat $PIDFILE) 3.56 - sleep 2 3.57 - $DAEMON $OPTIONS 3.58 - status 3.59 - ;; 3.60 - *) 3.61 - emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 3.62 - newline 3.63 - exit 1 3.64 - ;; 3.65 + (start) 3.66 + if active_pidfile $PIDFILE dovecot 3.67 + then 3.68 + _ '%s is already running.' $NAME 3.69 + exit 1 3.70 + fi 3.71 + action 'Starting %s: %s...' "$DESC" $NAME 3.72 + $DAEMON $OPTIONS 3.73 + status 3.74 + ;; 3.75 + (stop) 3.76 + if ! active_pidfile $PIDFILE dovecot 3.77 + then 3.78 + _ '%s is not running.' $NAME 3.79 + exit 1 3.80 + fi 3.81 + action 'Stopping %s: %s...' "$DESC" $NAME 3.82 + kill $(cat $PIDFILE) 3.83 + status 3.84 + ;; 3.85 + (restart) 3.86 + if ! active_pidfile $PIDFILE dovecot 3.87 + then 3.88 + _ '%s is not running.' $NAME 3.89 + exit 1 3.90 + fi 3.91 + action 'Restarting %s: %s...' "$DESC" $NAME 3.92 + kill $(cat $PIDFILE) 3.93 + sleep 2 3.94 + $DAEMON $OPTIONS 3.95 + status 3.96 + ;; 3.97 + (*) 3.98 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 3.99 + newline 3.100 + exit 1 3.101 + ;; 3.102 esac 3.103 3.104 exit 0