Useful SQL

From Roaring Penguin
Revision as of 13:49, 14 May 2014 by MCoyne (talk | contribs)

Jump to: navigation, search

PostgreSQL check a variable from command line:

  psql -U spam spam -c "select * from settings where variable = 'BayesDBFormat';"

Delete domain whitelists:

  psql -U spam -c "DELETE FROM domain_action WHERE action = 'allow-always'"

Delete sender whitelists:

  psql -U spam -c "DELETE FROM sender_action WHERE action = 'allow-always'"