summaryrefslogtreecommitdiffstats
path: root/extra/postfix/postfix-pcre.post-install
blob: f15b00cf758bfb04c2631f9871cd4aec61db00ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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"
		# pcre also handles regexp
		if [ "$m" = "pcre" ]; then
			echo -e "regex\t/usr/lib/postfix/$i\tdict_${m}_open"
		fi

	done
fi
	
echo '## AUTO END ##'
) >> $conf