wok-next rev 1203

postfix: set default localhost
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 08 16:47:03 2008 +0000 (2008-08-08)
parents f4d013306594
children abf5a1cc455a
files postfix/receipt
line diff
     1.1 --- a/postfix/receipt	Fri Aug 08 16:14:12 2008 +0000
     1.2 +++ b/postfix/receipt	Fri Aug 08 16:47:03 2008 +0000
     1.3 @@ -33,6 +33,19 @@
     1.4  	cp -a $_pkg/etc $fs
     1.5  	awk 'BEGIN {n=0} /MUST/ {n++} /ALIASES/ {n++} { if (n==1) print }' \
     1.6  		< $_pkg/etc/postfix/aliases > $fs/etc/postfix/aliases
     1.7 +	while read keyword data; do
     1.8 +		grep -q ^$keyword $fs/etc/postfix/main.cf && continue
     1.9 +		mv $fs/etc/postfix/main.cf $fs/etc/postfix/main.cf.$$
    1.10 +		awk "BEGIN { scan=1 } /^#$keyword / { if (scan) { print \"$keyword $data\" ; scan=0 } } { print }" \
    1.11 +			< $fs/etc/postfix/main.cf.$$ > $fs/etc/postfix/main.cf
    1.12 +		rm -f $fs/etc/postfix/main.cf.$$
    1.13 +	done << EOF
    1.14 +mydomain = localdomain
    1.15 +myorigin = localhost
    1.16 +mydestination = localhost, localhost.\$mydomain
    1.17 +mynetworks = 127.0.0.0/8
    1.18 +alias_maps = hash:/etc/postfix/aliases
    1.19 +EOF
    1.20  	cp -a stuff/etc $fs
    1.21  	cp -a $_pkg/var $fs
    1.22  	mv $fs/etc/postfix/TLS_LICENSE $fs/usr/share/licenses/POSTFIX_TLS_LICENSE