I want to install postfix (apt-get install postfix) to be able to send email thru php mail();

But i don't get does postfix needs an smtp to send emails or he can do it on his own? (because if it needs an smtp i can continue to use my PHPMailer or Swift Mailer)

I am on a dedicated server.

link|improve this question

78% accept rate
oh god, you don't have nothing to do other than click close on all questions? – yes123 Mar 25 '11 at 20:28
1  
@yes123 The close votes are to migrate this question to the correct location, not to just close the question. :-) – middaparka Mar 25 '11 at 20:32
aww sorry xD.... – yes123 Mar 25 '11 at 20:34
feedback

migrated from stackoverflow.com Mar 27 '11 at 4:27

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 2 down vote accepted

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

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

link|improve this answer
nice!!! do i need to make some other particular setting? – yes123 Mar 25 '11 at 20:34
feedback

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.

link|improve this answer
so what you suggest? sendmail or postfix? – yes123 Mar 26 '11 at 10:49
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.