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!

Block Script Emails

Discussion in 'E-mail Discussion' started by Osama Tariq, Oct 6, 2015.

  1. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    I want to blocked script emails for specific users, currently i have define acls in exim filter is it a proper way to blocked outgoing script emails ?


    Code:
    logfile /var/log/filter.log 0644
    if
    ($received_protocol is "local"
    or $received_protocol is "smtp"
    or $received_protocol is "smtps"
    or $received_protocol is "esmtp"
    or $received_protocol is "esmtpa"
    or $received_protocol is "esmtps"
    or $received_protocol is "esmtpsa")
    and ("$h_to:, $h_cc:" contains "Username")
    or ("$h_from:" contains "Username")
    then
    logwrite "$tod_full $message_id from $sender_address contained Username (Cpanel User) keywords"
    seen finish
    endif
    
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can disable scripts mail for any user by disabling phpmail function for that user.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,378
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    The filter rules will block incoming email. Have you considered simply disabling the PHP mail function for the accounts in question?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    How disable php mail() to send an E-mail to stop spaming from server for single domain ?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,378
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice