Blocking spam in precicely which context? I'm sure the spammers have a sizable repertoire of techniques for polluting the air-waves, but a common stop for them is to block the outbound port to mail servers:
/sbin/iptables -A OUTPUT -p tcp --dport 25 -j DROP