Making Plesk rewrite it’s .qmail properly

It seems after an upgrade from Plesk 8.0 to 8.1.1 the .qmail files didn’t regenerate their SpamAssassin configs correctly. Despite using mchk to rebuilt it failed to regen correctly SO, to disable then enable spamfiltering on all mailboxes which have the spamfilter setup I ran this:

for i in `mysql -u admin -p\`cat /etc/psa/.psa.shadow \` psa -e “select CONCAT(mail_name,’@’, AS email from mail,domains WHERE AND spamfilter=’true'” | grep -v email`; do /usr/local/psa/bin/ -u $i -manage-spamfilter false; /usr/local/psa/bin/ -u $i -manage-spamfilter true; done

It’s painful when you lose your Dad’s email among 400 spam! 🙁