I just got an iPhone as well and have 11 domains to check mail on.
I was using eudora and POP, but had to switch over to IMAP so whatever I see all my mail on my main computer or my iPhone.
I changed nothing at Dreamhost though.
I did set up MAIL.app to use mail.example.com as both incoming and outgoing mail servers as already mentioned.
one thing not mentioned is to make sure that you “require authentication” in MAIL for outgoing messages using your username and password.
another thing I noticed was that I could not initially check mail if I just used my plain text username, I had to input the “m” username that gets assigned to each user with a mailbox.
If you don’t know your “m” username, go the PANEL and look at the domain in question and see what active mailboxes are there, the “m” address will look like this: m427893003 (not mine, I made it up, but it will give you an idea of what to look for).
Use that for the Username with your password for both outgoing and incoming mail and see if it works.