• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Prevent use of local mailserver

Raphael_Michel

New Pleskian
Hello,
We set up a Plesk 12 server for web hosting purposes only.

All mail-related services, exception from "smtp server" and "Plesk milter" are disabled or uninstalled.

For specific domains, we want to prevent the useage of the php mail function with "localhost" to avoid problems with outgoing spam by unsecured scripts. Instead, we want to force webmasters to use external smtp servers.

Is there any directive or setting on domain-level that we allow for this limitation?
Thanks
 
This will only disable the mail services for this particular domain on Plesk, i.e. pop/imap/smtp mailboxes.

But it will not prevent using localhost sending mail by PHP.

Anyone?
 
Edit your php.ini, remember each domain can have its own php.ini configured.

ini_set('disable_functions','mail');
 
Hi,
Thank you, but I think this will disable the use of php mail() completely.
I only want to prevent php scripts the use of localhost for sending mails.

Any other suggestion?
Thank you
 
Back
Top