Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot disable PHP mail

Discussion in 'E-mail Discussions' started by Tayyem, Oct 28, 2017.

  1. Tayyem

    Tayyem Member

    Joined:
    Oct 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jordan
    cPanel Access Level:
    Root Administrator
    Hello

    I have tried to disable PHP mail from my server because there are some websites that abuse it
    ,but with no luck because the scripts are using their own libraries , Most of today's CMS have created their own libraries for sending emails so mentioning ( sendmail , mail ) functions will not help.

    I'm searching for a solution that its not in cPanel forum, mentioning any documentation link will also not help especially "How to Prevent Email Abuse" because I have tried them all.

    Thank you
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,673
    Likes Received:
    73
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    If you are using suPHP, then you can restrict the users from using their custom php.ini and force them to use your one in which you added the mail in the disable functions list..
    What version of EasyApache do you currently have on the server?
     
  3. Tayyem

    Tayyem Member

    Joined:
    Oct 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jordan
    cPanel Access Level:
    Root Administrator
    Thanks for the replay
    I'm using EasyApache 4 but you didn't get the point my friend , no need for the abusers to edit php.ini because they are not using the main php mail functions they are using their own mailers that connects to the smtp port and send mails without touching php mail functions
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,484
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The following option is useful if the scripts are attempting to send mail via SMTP via a remote mail server:

    "WHM Home » Security Center » SMTP Restrictions"

    As for local SMTP senders, have you considered setting up email sending limits? We document how to do this at:

    How to Set Email Send Limits - cPanel Knowledge Base - cPanel Documentation

    Additionally, in cPanel version 68, we added a new notification in "WHM >> Contact Manager" that you can configure to alert you if an email account is abusing the system:

    Thank you.
     
  5. Tayyem

    Tayyem Member

    Joined:
    Oct 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jordan
    cPanel Access Level:
    Root Administrator
    Thank you I did that but I cannot set it to zero , only one email per hour. Can I set that to zero without being unlimited
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,484
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You can't set the max hourly email limit to zero. Note the maximum hourly email limit applies to all email, not just email from PHP scripts. Is your goal to disable email completely for an account, even outside of PHP?

    Thank you.
     
  7. Tayyem

    Tayyem Member

    Joined:
    Oct 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jordan
    cPanel Access Level:
    Root Administrator
    Yes because it’s sending emails from months and I cannot stop it, I have disabled the php mail and send mail functions but it’s still sending, I have tried most of things here in the fourm and nothing worked.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,484
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  9. Tayyem

    Tayyem Member

    Joined:
    Oct 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jordan
    cPanel Access Level:
    Root Administrator
    Amazing Its blocked now

    I've done two thing's I don't know who was the effective

    1- enabled ModSecurity and COMODO and OWASP vendors
    2- blocked the domains using suspend_outgoing_email

    Thank you very much Michael for your big support in the forum and for helping us, hope you have a good day.
     
    cPanelMichael likes this.
Loading...

Share This Page