Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Ubuntu 10.10 32 bit. This is new server with nginx, php-fpm and PHP 5.3

I will install postfix. Currently the server can send mail (maybe sending through sendmail) but very slow until PHP timeout.

To install, I will run:

sudo apt-get install php-pear
sudo pear install mail
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install mail_mime
sudo apt-get install postfix

But after Postfix installed, how to make sure all mails using Postfix?

share|improve this question
    
Just remove sendmail? –  larsks Jun 23 '11 at 14:02

2 Answers 2

The PHP mail() function uses the sendmail command. So if you replace Sendmail with Postfix (apt-get install postfix should automatically uninstall sendmail), the PHP mail() function will use Postfix's sendmail command.

share|improve this answer

As sborsky says - you can only sensibly have one MTA on a system - the package manager should handle removal of sendmail.

While I've seen benchmarks showing postfix can be faster than sendmail that's nothing to do with what's happening here.

The symptoms you describe are indicative of a mis-configured server - the MTA is unable to resolve names or connect to upstream servers. Switching the MTA software is not going to resolve that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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