SHA256
1
0
forked from pool/postfix
postfix/convert-bdb-to-lmdb.sh

19 lines
421 B
Bash
Raw Normal View History

#!/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