xkmail 0 Newbie Poster

I have a small server and want to ban ip address I get alot of spam from.
I use fedora 4 with iptables, spamassassin, clamav, and psotfix.
I get the line in /var/log/maillog that says:
Jul 14 20:52:33 xkmail amavis[15966]: (15966-06) Blocked SPAM, LOCAL [127.0.0.1] [216.22.18.252] <ret@threecurtain.com> -> <miranda@xkmail.hopto.org>,
Message-ID: <1184460111.5804@threecurtain.com>, mail_id: fiWKW0St3zjg, Hits: 25.766, 2123 ms
I want a simple script to get that ip address out of that line and run it in iptables using:
/sbin/iptables -I INPUT -i eth0 -s xxx.xxx.xxx.xxx -j DROP
I tried grep but looks like I need sed and cut, any input appreciated
kevin