Mail::SpamAssassin::Plugin::GoogleSafeBrowsing - SpamAssassin plugin to score mail based on Google blocklists.
loadplugin Mail::SpamAssassin::Plugin::GoogleSafeBrowsing body GOOGLE_SAFEBROWSING eval:check_google_safebrowsing_blocklists()
Score messages by checking the URIs they contain against Google's safebrowsing tables. See http://code.google.com/apis/safebrowsing/
The GoogleSafeBrowsing SpamAssassin plugin relies on a local cache of the URI tables to scan messages. The local cache should be updated at least once every 30 minutes. The recommended setup looks something like:
Net::Google::SafeBrowsing::Blocklist Net::Google::SafeBrowsing::UpdateRequest Mail::SpamAssassin::Plugin::GoogleSafeBrowsing
http://code.google.com/apis/safebrowsing/key_signup.html
Install a cron job that, every 25 minutes or so, runs something like:
APIKEY=ABCD... for LIST in goog-black-hash goog-malware-hash; do blocklist_updater --apikey "$APIKEY" --blocklist $LIST --dbfile /var/cache/spamassassin/${LIST}-db done
"goog-black-hash" and "goog-malware-hash" are the only lists Google has for now. goog-black-hash seems to be a list for the worst sites.
Typically in local.cf, include lines: loadplugin Mail::SpamAssassin::Plugin::GoogleSafeBrowsing body GOOGLE_SAFEBROWSING eval:check_google_safebrowsing_blocklists()
google_safebrowsing_dir /var/cache/spamassassin google_safebrowsing_apikey ABCD... google_safebrowsing_blocklist goog-black-hash 0.2 google_safebrowsing_blocklist goog-malware-hash 0.1
In this example, for each URI in a message that has a match in goog-black-hash, add 0.2 to the message's spam score.
To install Mail::SpamAssassin::Plugin::GoogleSafeBrowsing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::SpamAssassin::Plugin::GoogleSafeBrowsing
CPAN shell
perl -MCPAN -e shell install Mail::SpamAssassin::Plugin::GoogleSafeBrowsing
For more information on module installation, please visit the detailed CPAN module installation guide.