# HG changeset patch # User Hans-G?nter Theisgen # Date 1645285639 -3600 # Node ID 1c049ccf6c26e136e6a8d3ca0c65508f6d2e74ec # Parent 34e801e0eb52b301790f1735e80cdee0f3a36e8c updated dovecot (2.3.9.2 -> 2.3.18) diff -r 34e801e0eb52 -r 1c049ccf6c26 dovecot/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dovecot/description.txt Sat Feb 19 16:47:19 2022 +0100 @@ -0,0 +1,5 @@ +Dovecot is an open source IMAP and POP3 email server for Linux +and UNIX-like systems, written with security primarily in mind. +Dovecot is an excellent choice for both small and large installations. +It's fast, simple to set up, requires no special administration and +it uses very little memory. diff -r 34e801e0eb52 -r 1c049ccf6c26 dovecot/receipt --- a/dovecot/receipt Sat Feb 19 14:19:02 2022 +0000 +++ b/dovecot/receipt Sat Feb 19 16:47:19 2022 +0100 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="dovecot" -VERSION="2.3.9.2" +VERSION="2.3.18" CATEGORY="network" SHORT_DESC="Dovecot IMAP and POP3 Server." MAINTAINER="l.lemarinel@gmail.com" @@ -12,8 +12,9 @@ WGET_URL="https://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL" DEPENDS="libcap libmysqlclient libssl openldap pam postgresql" -BUILD_DEPENDS="libcap-dev libmysqlclient mysql-dev openldap-dev - openssl-dev pam-dev postgresql-dev sqlite-dev" +BUILD_DEPENDS="libcap-dev libmysqlclient libpostgresqlclient + mysql-dev openldap-dev openssl-dev pam-dev + postgresql-dev sqlite-dev" # What is the latest version available today? current_version() @@ -27,7 +28,7 @@ { ./configure \ --prefix=/usr \ - --sysconfdir=/etc/dovecot \ + --sysconfdir=/etc \ --localstatedir=/var \ --libexecdir=/usr/lib/$PACKAGE \ --with-ldap=plugin \ @@ -38,55 +39,49 @@ --with-ssl=openssl \ $CONFIGURE_ARGS && make && - make DESTDIR=$DESTDIR install - + make install DESTDIR=$DESTDIR } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + mkdir -p $fs/etc/ssl/misc mkdir -p $fs/usr/lib mkdir -p $fs/var/log/dovecot - mkdir -p $fs/etc/ssl/misc - cp -a $install/usr/sbin $fs/usr - cp -a $install/usr/bin $fs/usr - cp -a $install/usr/lib $fs/usr - cp -a $install/etc $fs - - cp -pa $stuff/init.d $fs/etc + cp -a $install/etc $fs + cp -a $install/usr/bin $fs/usr + cp -a $install/usr/lib $fs/usr + cp -a $install/usr/sbin $fs/usr - #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf + cp -pa $stuff/init.d $fs/etc cp -pa $install/usr/share/doc/dovecot/example-config/* \ - $fs/etc/dovecot/ - #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d - #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d - cp -pa $src/doc/*.cnf $fs/etc/ssl - cp -pa $src/doc/mkcert.sh \ - $fs/etc/ssl/misc/dovmkcert.sh + $fs/etc/dovecot + cp -pa $src/doc/*.cnf $fs/etc/ssl + cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh # Remove archive files *.*a - find $fs -name "*.*a" -exec rm -f {} \; - + find $fs -name "*.*a" -exec rm -f {} \; + # Fix permissions - chmod 755 $fs/etc/ssl/misc/* + chmod 755 $fs/etc/ssl/misc/* # Customising configuration. - sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \ - $fs/etc/dovecot/conf.d/10-master.conf + sed -i -e "s|^#default_vsz_limit.*|default_vsz_limit = 50M|" \ + $fs/etc/dovecot/conf.d/10-master.conf - sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \ - $fs/etc/dovecot/conf.d/10-logging.conf - - sed -i -e "s/^#listen.*/listen = */" \ - $fs/etc/dovecot/dovecot.conf + sed -i -e "s|^#log_path =.*|log_path = /var/log/dovecot/dovecot.log|" \ + $fs/etc/dovecot/conf.d/10-logging.conf + + sed -i -e "s|^#listen.*|listen = *|" \ + $fs/etc/dovecot/dovecot.conf # Unsafe, see CVE-2014-3566 POODLE - sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \ - $fs/etc/dovecot/conf.d/10-ssl.conf + sed -i -e "s|^#ssl_protocols =.*|ssl_protocols = !SSLv2 !SSLv3|" \ + $fs/etc/dovecot/conf.d/10-ssl.conf } -#nd post install commands for Tazpkg. +# Post install commands for Tazpkg. post_install() { local user @@ -98,7 +93,7 @@ if ! grep -q $user "$1/etc/passwd" then echo - echo -n "Adding user/group $user..." + echo -n "Adding user and group $user..." chroot "$1/" addgroup -g 76 -S $group chroot "$1/" adduser -u 76 -S -D -H -G $group $user chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull @@ -108,6 +103,10 @@ # Set permissions for files and directories chroot "$1/" chown -R ${user}.${group} /var/log/${user} \ + # Create certificate, if neccessary + [ -f "$1/etc/ssl/certs/dovecot.pem" ] || + chroot "$1/" sh -c 'cd etc/ssl; ./misc/dovmkcert.sh' + cat <$(_ 'Usage:') $0 [start|stop|restart]" - newline - exit 1 - ;; + (start) + if active_pidfile $PIDFILE dovecot + then + _ '%s is already running.' $NAME + exit 1 + fi + action 'Starting %s: %s...' "$DESC" $NAME + $DAEMON $OPTIONS + status + ;; + (stop) + if ! active_pidfile $PIDFILE dovecot + then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Stopping %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + status + ;; + (restart) + if ! active_pidfile $PIDFILE dovecot + then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Restarting %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + sleep 2 + $DAEMON $OPTIONS + status + ;; + (*) + emsg "$(_ 'Usage:') $0 [start|stop|restart]" + newline + exit 1 + ;; esac exit 0