Bug 16104 - whitelisting all contacts automatically
That title should really be renamed "automatically whitelisting addresses you've recently sent to".
Using Stop spam with the Anti-Spam-SMTP-Proxy (ASSP),
But say you wanted to whitelist anything in your address books (if you want tweak it to use a specific /Contacts folder or the auto /Emailed Contacts) here's crude periodic script method:
Code:
#!/bin/bash
ACC=`/opt/zimbra/bin/zmprov gaa`
for i in $ACC
do
/opt/zimbra/bin/zmmailbox -z -m $i gact | grep -u email: | sort | uniq | sed -e 's/email:/whitelist_from/g' >> /tmp/autowhitelistall.tmp
done
sed -i '/yourdomain1.com/d' /tmp/autowhitelistall.tmp
sed -i '/yourdomain2.com/d' /tmp/autowhitelistall.tmp
... Repeat for each of your domains, since already trusted - avoid bloat ...
cat /tmp/autowhitelistall.tmp | sort | uniq > /opt/zimbra/conf/spamassassin/autowhitelist.cf
rm -f /tmp/autowhitelistall.tmp
/opt/zimbra/bin/zmamavisdctl restart
The lines in autowhitelistall.tmp & autowhitelist.cf should appear like:
whitelist_from user@domain.com
Or instead feed that into zmprov ma user@domain.com +amavisWhiteListSender name@external.com so that users can manage it.
(Would have to set a higher zimbraMailWhitelistMaxNumEntries on the cos/account since default is 100.)
And as you already know from the other thread, exposed in GnR mail preferences tab: