Giving spammers a hard time: The rules

/etc/pf.conf

table <spamd> persist
table <spamd-white> persist
rdr pass on $ext_if inet proto tcp from <spamd> to { $ext_if, $int_if:network } port smtp -> 127.0.0.1 port 8025
rdr pass on $ext_if inet proto tcp from !<spamd-white> to { $ext_if, $int_if:network } port smtp -> 127.0.0.1 port 8025

Essential data in the spamd and spamd-white tables