postfix for sending emails thru php?

Solution 1:

POSTFIX is an smtp server itself. You won't need to install anything else.

http://www.postfix.org/SMTPD_ACCESS_README.html

Solution 2:

No, Postfix is an MTA (Mail Transfer Agent). It comes with a SMTP server of its own but that is only used to receive messages.

You do not need to use SMTP to send messages unless you want to relay the messages to an SMTP server for some reason and the SMTP server is on a different machine.

You can hand over messages to Postfix from PHP using the sendmail emulation program that comes in PHP. That program drops messages in Postfix local queue, so Postfix daemon delivers the messages directly.

There is an article here about the fastest ways to deliver e-mail in PHP that explains that in more detail. Notice the diagram image in the article that explains how messages are routed.