• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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