You could use ipchains. The best way would be to stop the services, but if you would rather leave them running, you can simply deny access to these ports.
/sbin/ipchains -A input -p tcp --dport 389 -j DENY
/sbin/ipchains -A input -p tcp --dport 25 -j DENY
If you just want to deny access on the external interface (assuming you're in server-gateway mode), then use:
/sbin/ipchains -A input -p tcp --dport 389 -j DENY -i ethX
/sbin/ipchains -A input -p tcp --dport 25 -j DENY -i ethX
Where X is the interface number, such as eth0, or eth1.
You could also deny access to these ports for everyone EXCEPT your local netmask, assuming your netmask is 192.168.0.0/24
/sbin/ipchains -A input -p tcp --source ! 192.168.0.0/24 --dport 389 -j DENY
/sbin/ipchains -A input -p tcp --source ! 192.168.0.0/24 --dport 25 -j DENY
Add these rules to the bottom of /etc/rc.d/rc.local if you want to execute them on reboot.
Nathan