Yea its definitely possible, as long as your name server supports dynamic updates, if you're running one yourself make sure you're able to do dynamic updates to the top level com. domain.
Or alternatively you can use a free DNS service such as http://www.afraid.org
, it provides scripts that you can run periodicaly to dynamically update your DNS records. I use it, it has been very reliable so far.
Since you're running it all on your own server I'd imagine you probably just need to have a Type A record, for example www.yourdomain.com
pointing to your box, and have a MX record plus some CNAME records(aliases) pointing to it if necessary(eg. ftp.yourdomain.com, mail.yourdomain.com etc). Then you setup a cron job to execute a script that updates the www.yourdomain.com
record periodically say every 6 hours, have your MTA configured to receive mails for your domain, then hopefully everything should be running happily afterwards.