Code:
iptables -A INPUT -m tcp -p tcp --dport 25 -s 1.2.3.4 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -s 1.2.3.5 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -s 1.2.3.6 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 25 -j REJECT
change 1.2.3.x to the ip(s) that you want to allow.
keep in mind that this will append to your already existing
INPUT chain and can be negated by the rules above it.