Plesk

Emails sent from Plesk server using PHP mail() function are rejected on some recipient mail servers

Symptoms

Cause

When sending emails from the Plesk server using PHP mail() function, the address like sysuser@main-subscription_domain.com is by default used as the From: address.

On some recipient SMTP servers, the verification of the sender domain is enabled, and, as the domain main-subscription-domain.com is not resolved over DNS, the verification fails and the messages are rejected.

Resolution

For one domain

  1. Log into Plesk.

  2. Go to Domains > example.com > PHP Settings.

  3. Add the following line to the field Additional configuration directives:

    sendmail_path="/usr/sbin/sendmail -t -i -f sender@example.com"

    Replace sender@example.com with the address which should be used as a sender.

  4. Click OK or Apply to save the changes.

For all domains under specific PHP version

  1. Log into Plesk.

  2. Go to Tools & Settings > PHP Settings > PHP_version > php.ini.

  3. Modify the parameter sendmail_path:

    sendmail_path="/usr/sbin/sendmail -t -i -f sender@example.com"

    Replace sender@example.com with the address which should be used as a sender.

  4. Click OK to save the changes.