Need help with setting postfix

I am quite new to server management i always used Shared hosting this is my first experience but i am facing quite issue in only thing is that how to setup email server ... I just installed postfix and php mail() function started working. My emails land directly in spam folder of any mailbox how to resolve that ? I want to setup mailbox also for different domains and i am unable to understand how to do all this. Can any one help me with this and details about how these things work basically i will be thankful