Commit 30389111 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/dovecot: use logfile in default config and provide logrotate

fixes #360
parent a587866e
......@@ -2,19 +2,21 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dovecot
pkgver=1.2.11
pkgrel=2
pkgrel=3
pkgdesc="IMAP and POP3 server"
url="http://www.dovecot.org/"
license="LGPL-2.1"
depends="openssl"
pkgusers="dovecot"
pkggroups="dovecot"
depends="logrotate"
makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev
mysql-dev sqlite-dev"
install="dovecot.pre-install dovecot.post-install"
subpackages="$pkgname-doc $pkgname-dev $pkgname-pgsql $pkgname-mysql
$pkgname-sqlite"
source="http://www.dovecot.org/releases/1.2/$pkgname-$pkgver.tar.gz
dovecot.logrotate
dovecot.initd
"
......@@ -42,6 +44,7 @@ package() {
install -d "$pkgdir"/var/run/dovecot \
"$pkgdir"/etc/ssl/dovecot
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -D "$srcdir"/dovecot.logrotate "$pkgdir"/etc/logrotate.d/dovecot
install doc/dovecot-openssl.cnf "$pkgdir"/etc/dovecot/
mv "$pkgdir"/etc/dovecot/dovecot-example.conf \
"$pkgdir"/etc/dovecot/dovecot.conf || return 1
......@@ -57,6 +60,7 @@ package() {
s/\#passdb passwd/passdb passwd/
s/\#\}/\}/
}' \
-e 's,#log_path =.*,log_path = /var/log/dovecot.log,' \
"$pkgdir"/etc/dovecot/dovecot.conf
}
......@@ -87,4 +91,5 @@ sqlite() {
}
md5sums="bdac013fd57aa616ea4bdd9ac34557c6 dovecot-1.2.11.tar.gz
aec5cc797ab2acf72ce3b6bb1030345f dovecot.logrotate
c58b474dca20e6e60fa4f1f5b9c726e1 dovecot.initd"
/var/log/dovecot*.log {
daily
missingok
copytruncate
rotate 7
compress
notifempty
sharedscripts
postrotate
if /etc/init.d/dovecot -q status ; then \
/etc/init.d/dovecot reload > /dev/null 2>&1 || true ; \
fi;
endscript
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment