wok rev 1195

postfix: create /etc/aliases.db
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 06 16:22:16 2008 +0000 (2008-08-06)
parents 523d35aed712
children cbb14556d72b
files postfix/receipt
line diff
     1.1 --- a/postfix/receipt	Tue Aug 05 18:42:51 2008 +0000
     1.2 +++ b/postfix/receipt	Wed Aug 06 16:22:16 2008 +0000
     1.3 @@ -10,6 +10,7 @@
     1.4  WGET_URL="ftp://mir1.ovh.net/ftp.postfix.org/postfix-release/official/$TARBALL"
     1.5  BUILD_DEPENDS="db-dev openldap-dev pcre-dev openssl-dev"
     1.6  DEPENDS="libdb libldap pcre openssl"
     1.7 +CONFIG_FILES="/etc/postfix"
     1.8  
     1.9  # Rules to configure and make the package.
    1.10  compile_rules()
    1.11 @@ -30,6 +31,9 @@
    1.12  	cp -a $_pkg/usr/bin $fs/usr
    1.13  	cp -a $_pkg/usr/sbin $fs/usr
    1.14  	cp -a $_pkg/etc $fs
    1.15 +	awk 'BEGIN {n=0} /MUST/ {n++} /ALIASES/ {n++} { if (n==1) print }' \
    1.16 +		< $_pkg/etc/postfix/aliases > $fs/etc/postfix/aliases
    1.17 +	cp -a stuff/etc $fs
    1.18  	cp -a $_pkg/var $fs
    1.19  	mv $fs/etc/postfix/TLS_LICENSE $fs/usr/share/licenses/POSTFIX_TLS_LICENSE
    1.20  	mv $fs/etc/postfix/LICENSE $fs/usr/share/licenses/POSTFIX_LICENSE
    1.21 @@ -44,21 +48,12 @@
    1.22  {
    1.23  	( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
    1.24  		$1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
    1.25 -etc/postfix/access
    1.26 -etc/postfix/aliases
    1.27 -etc/postfix/canonical
    1.28 -etc/postfix/generic
    1.29 -etc/postfix/header_checks
    1.30 -etc/postfix/main.cf
    1.31 -etc/postfix/master.cf
    1.32 -etc/postfix/relocated
    1.33 -etc/postfix/transport
    1.34 -etc/postfix/virtual
    1.35 +$(cd $1/ ; find etc/postfix -type f)
    1.36  EOT
    1.37          # adduser postfix if needed
    1.38  	if ! grep -q postfix $1/etc/passwd; then
    1.39  		echo -n "Adding user postfix..."
    1.40 -		chroot $1/ adduser postfix -D -H -S
    1.41 +		chroot $1/ adduser postfix -D -H -S -h /dev/null
    1.42  		status
    1.43  	fi
    1.44  	# addgroup postfix if needed
    1.45 @@ -74,9 +69,9 @@
    1.46  		status
    1.47  	fi
    1.48  	chown postfix /var/spool/postfix/* /var/lib/postfix
    1.49 -	chown root /var/spool/postfix/pid
    1.50  	chgrp postdrop /var/spool/postfix/maildrop /var/spool/postfix/public \
    1.51  			/usr/sbin/postdrop /usr/sbin/postqueue
    1.52 +	postalias /etc/postfix/aliases
    1.53  	cat <<EOF
    1.54  ----
    1.55  Warning: you still need to edit myorigin/mydestination/mynetworks