forked from pool/postfix
19 lines
421 B
Bash
19 lines
421 B
Bash
|
#!/bin/bash
|
||
|
sed -i 's/hash:/lmdb:/g' /etc/postfix/main.cf
|
||
|
for i in $( find /etc/postfix/ -name "*.db" )
|
||
|
do
|
||
|
j=$( echo $i | sed 's/.db$//' )
|
||
|
postmap $j
|
||
|
mv $i $i-back
|
||
|
done
|
||
|
for i in $( find /etc/aliases.d/ -name "*.db" )
|
||
|
do
|
||
|
j=$( echo $i | sed 's/.db$//' )
|
||
|
postalias $j
|
||
|
mv $i $i-back
|
||
|
done
|
||
|
if [ -e /etc/aliases.db ]; then
|
||
|
mv /etc/aliases.db /etc/aliases.db-back
|
||
|
postalias /etc/aliases
|
||
|
fi
|