• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Disable PHP mail for single domain

FarazK

New Pleskian
Hi,

We are using Plesk version 12.0.18 and in a situation where one of our domain is keep sending spams(due to outdated code), we will resolve the code issue but it will take much time for us, so I was wondering if there is any possibility that we can disable PHP mail function for this domain? I know I can disable the mail service for single domain but that does not prevent that domain to send emails through PHP scripts...

Someone suggested us that under PHP settings of domain I can define variable disable_functions = mail but unfortunately that also did not work. Can someone please help on this? may be any workaround via postfix or other.

Regards,
Farmi
 
Hi,

Yes, this is what I did and defining variable disable_functions = mail under domain PHP settings prevents the script to run via http://example.com/spam.php but if it runs by shell via php /path/spam.php still sends the mail. Not sure why is it doing by shell?

Regards,
Faraz
 
Back
Top