Yes, I was using dyndns to host dns for my mail server for years. Just setup the MX record. Be aware, if you have a dynamic IP and want to host your own outgoing SMTP, much of the mail that you send can get blacklisted because if came from a dynamic IP. I'd suggest using a fixed and trusted SMTP server or find someone that will accept a relay from your server.