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.

Block Script Emails

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

  1. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can disable scripts mail for any user by disabling phpmail function for that user.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    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.
     
  4. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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 ?
     
Loading...

Share This Page