This commit is contained in:
cutemeli
2025-12-22 10:35:30 +00:00
parent 0bfc6c8425
commit 5ce7ca2c5d
38927 changed files with 0 additions and 4594700 deletions

View File

@@ -1,41 +0,0 @@
#!/bin/bash
### Copyright 1999-2025. WebPros International GmbH. All rights reserved.
# Converts spamassassin bases from db 1.85 to new db format or removes it if db utilities does not exist
#
# Argument is a directory with spamassassin bases
#
# Returns 1 if db format is not 1.85, 0 otherwise
[ -z "$1" ] && exit 1
LIST=`file $1/* | grep 1.85 | cut -f1 -d:`
[ -z "$LIST" ] && exit 1
if [ -x "/usr/bin/db_dump185" ]; then
DB_DUMP185=/usr/bin/db_dump185
elif [ -x "/usr/bin/db1_dump185" ]; then
DB_DUMP185=/usr/bin/db1_dump185
elif [ -x "/usr/bin/db3_dump185" ]; then
DB_DUMP185=/usr/bin/db3_dump185
fi
if [ -x "/usr/bin/db_load" ]; then
DB_LOAD=/usr/bin/db_load
elif [ -x "/usr/bin/db4.2_load" ]; then
DB_LOAD=/usr/bin/db4.2_load
elif [ -x "/usr/bin/db4.3_load" ]; then
DB_LOAD=/usr/bin/db4.3_load
fi
for F in $LIST; do
if [ -n "$DB_DUMP185" ] && [ -n "$DB_LOAD" ]; then
DB="$F.db"
$DB_DUMP185 $F | $DB_LOAD $DB
mv $DB $F
else
rm -f $F
fi
done
exit 0