• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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