forked from pool/postfix
d5d7245c6d
This package is without bdb support. That's why convert must be done without any suse release condition. o remove patch postfix-no-btree.patch o add set-default-db-type.patch OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=398
22 lines
535 B
Bash
22 lines
535 B
Bash
#!/bin/bash
|
|
if grep -q "hash:" /etc/postfix/{main.cf,master.cf}; then
|
|
sed -i 's/hash:/lmdb:/g' /etc/postfix/{main.cf,master.cf}
|
|
fi
|
|
if grep -q "btree:" /etc/postfix/{main.cf,master.cf}; then
|
|
sed -i 's/btree:/lmdb:/g' /etc/postfix/{main.cf,master.cf}
|
|
fi
|
|
for i in $( find /etc/postfix/ -name "*.db" )
|
|
do
|
|
mv $i $i-back
|
|
postmap ${i%.db}
|
|
done
|
|
for i in $( find /etc/aliases.d/ -name "*.db" )
|
|
do
|
|
mv $i $i-back
|
|
postalias ${i%.db}
|
|
done
|
|
if [ -e /etc/aliases.db ]; then
|
|
mv /etc/aliases.db /etc/aliases.db-back
|
|
postalias /etc/aliases
|
|
fi
|