You do this by accessing webmail with the phone you want to set this up on.

1) Fire up your phone's web browser and enter https://webmail.yourdomainname.com.au  
2) login with your email address and email password

3) Click on the [WebMail Home] button in the top right corner

4) Click the link that says [automatically configure my device]. Ignore the stuff above that (as tempting as it might seem - this will not do what you need)

5) On this page look for "Mail Client Automatic Configuration Scripts" and click the [IMAP over SSL/TLS] link and then follow the prompts to install the correct settings on your phone.