/sbin/ipchains -A input -p tcp --source ! --dport ! 25 -i -j DENY
I'd just worry about TCP unless you really want to be restrictive with UDP, but most UDP programs have a TCP controlling port. I think the above IPChains rule will work, I haven't tested it, but I think the logic is sound.
Deny all TCP protocols for all users except for all protocols except TCP port 25 (SMTP).
If the command works I'll help you template it.
Hope this helped,
Nathan