Skip to content

Instantly share code, notes, and snippets.

@cb1kenobi
Created May 30, 2015 00:52
Show Gist options
  • Save cb1kenobi/2995a6f25685e02f3262 to your computer and use it in GitHub Desktop.
Save cb1kenobi/2995a6f25685e02f3262 to your computer and use it in GitHub Desktop.
Postfix CIDR blocklist update and spamassassin learn script
#!/bin/bash
curl https://www.spamhaus.org/drop/drop.lasso 2>/dev/null | sed '/^\s*;/d' | sed 's/;.*/REJECT/' > /etc/postfix/client.cidr
postfix reload
sa-learn -D --sync --spam /data/mail/cb1inc.com/chris/.Spam/{cur,new}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment