#
# Sample ruleset for postfwd shows how to use a single ruleset for multiple instances
#

# commmon rules
id=R001
	action=note($$version $$postfwd_interface:$$postfwd_port)

# postfwd1 specific rules (ratelimits)
id=V1
	version=~/^postfwd\s/
	action=jump(V1_R001)

# postfwd2 specific rules (dns, lists)
id=V2
	version=~/^postfwd2/
	action=jump(V2_R001)

# default: log the request and finish
id=DEFAULT; action=DUNNO

##
## POSTFWD 1 Rules
##
id=V1_R001
	action=rate(client_address/3/20/450 4.7.1 rate exceeded)

id=V1_R002
	action=rate(sender/3/20/450 4.7.1 rate exceeded)

id=V1_R999
	 action=jump(DEFAULT)

##
## POSTFWD 2 Rules
##
id=V2_R001
        rbl=list.dnswl.org
        rbl=hostkarma.junkemailfilter.com/^127\.0\.0\.1$/3600 
        rhsbl_client=hostkarma.junkemailfilter.com/^127\.0\.0\.1$/3600
	action=note(WHITELISTED)

id=V2_R002
	 action=ask(postfwd1:10050)

id=V2_R999
	 action=jump(DEFAULT)

