I really don't understand what you're asking in the first question, but the dyndns.org script updates *.mydomain.dyndns.org. So, mail.mydomain should work as well as
www.mydomain, etc.
To get a program to start automatically, you could add it to your rc.local script, though there might be a better place for it depending on exactly what it is.