postfix-pcre.post-install 447 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh

# update the dynamicmaps.cf
conf=/etc/postfix/dynamicmaps.cf

sed -i -e '/\#\# AUTO BEGIN/,/\#\# AUTO END/d' $conf

(
echo '## AUTO BEGIN ##'
if cd /usr/lib/postfix/; then
	for i in *.so; do
		m=${i#dict_}
		m=${m%.so}
		echo -e "$m\t/usr/lib/postfix/$i\tdict_${m}_open"
15 16
		# pcre also handles regexp
		if [ "$m" = "pcre" ]; then
17
			echo -e "regex\t/usr/lib/postfix/$i\tdict_${m}_open"
18 19
		fi

20 21 22 23 24
	done
fi
	
echo '## AUTO END ##'
) >> $conf
25