extend template, shamelessly stolen from: http://russell.ballestrini.net/postfix-salt-state-formula/