• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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