blob: 6962486fe10047ca6d809c761f4d23deaefda9c9 (
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 "regexp\t/usr/lib/postfix/$i\tdict_${m}_open"
fi
done
fi
echo '## AUTO END ##'
) >> $conf
|