iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT iptables -A INPUT -p tcp --dport 25 -j DROP
"Anything coming from localhost to port 25, accept" and the second rule says "Drop anything coming into port 25". The first line is processed first, allowing localhost, and anything else will get dropped by the second line.
The second rule seems to cover the case of the first rule. So why doesn't the second rule override the first rule?
How do rules with overlap coverage work together in general?