Same is true for ftp and other services. These daemons only need to be run for excepting connections to your system from an outside source. Unless you have a good reason for doing so, and know what you are doing, then you should not be running such publicly accessible services. Many mail and irc servers aren't happy without identd there. Newer versions are reasonably secure.
Mail is a little more complicated.
If you are retrieving mail via POP3 from your ISP, this port does not need to be open to the world. Such mail does not come in via port 25. In fact, this is a common default set up. The solution here is to upgrade to a newer version that uses unprivileged ports by default. It is probably safe to run a web server if you want to.