In the meantime this is working for me:
Code:
#!/bin/bash
ACC=`zmprov gaa`
for i in $ACC
do
zmmailbox -z -m $i gact | grep -u email: | sort | uniq | sed -e 's/email:/whitelist_from/g' >> autowhitelistall.tmp
done
cat autowhitelistall.tmp | sort | uniq > autowhitelistall.cf
rm -f autowhitelistall.tmp
zmamavisdctl restart
It's not domain specific but that works better for me anyway.