0

We recently moved our Drupal sites to a Linode server. One of those sites has a lot of users filling forms.

The previous server sent, with no problem, all form registrations to an email address, this is not the case for our new Linode server. Some user registrations never get delivered to the appropriated inboxes.

Do we need to install a mail server (sendmail, postfix) to get the PHP mail function running smoothly as in the previous server?

If yes, a great link to get us started would be appreciated.

If no, what should we do to get the mail function working correctly?

Francisco
  • 105
  • 1
  • 6
  • 2
    The `mail()` can use a local `sendmail` or it can be pointed at an external smtp server. What option you use completely depends on your requirements. http://php.net/manual/en/mail.configuration.php As for how to pick the right option. See the linked question. – Zoredache Dec 11 '14 at 21:07
  • You need to configure sendmail, refer this link it may be helpful : http://girishsh.in/configauration-postfix-mail-sending-php-magento-ubuntu/ – Girish SH Dec 11 '14 at 21:40
  • @masegaloeh don't think is duplicated bearing in mind the main problem isn't the mails got to spam but they're never delivered due to a misconfiguration. IMO – Francisco Dec 11 '14 at 22:56
  • You don't need `sendmail`, but a `sendmail` compliant MTA will work. You could use nullmailer and a smart relay such as Mandrill. – Paul Dec 12 '14 at 05:03

1 Answers1

4

IIRC the PHP mail function on Linux typically defaults to using the sendmail command. Sendmail (or any local replacement SMTP server) needs not be explicitly configured nor be running as a daemon to work.

For your messages to delivered reliably though, configuring and running sendmail (or replacement) in daemon mode is probably recommended. For instance you normally need queue management to deal with grey listing and other time-outs.

The alternative is to configure PHP to use an outgoing mailserver aka SMTP relay or smart-host. smtp and smtp_port in the PHP ini file http://php.net/manual/en/mail.configuration.php

HBruijn
  • 72,524
  • 21
  • 127
  • 192