Yahoo Mail has provided an easy step by step guide to do this easily.
You can view the tutorial here. http://help.yahoo.com/tutorials/mmail/mmail/mm_accessother1.html
Note:
Your username is 'youremail'@'yourdomainname'.'extension'
The mail server is of the form mail.yourdomainname.ext
The port numbers are always correct as at the last time checked. Leave them as Yahoo puts it.