0

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?

  • Just remove sendmail? – larsks Jun 23 '11 at 14:02
4

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.

0

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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