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.

domainlist blocked_domains doesnt work

Discussion in 'E-mail Discussions' started by Patricio Segovia, Feb 27, 2017.

  1. Patricio Segovia

    Joined:
    Feb 27, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chile
    cPanel Access Level:
    Root Administrator
    Hi guys i trying to block some domains to send spam via exim, and i setup this:

    domainlist blocked_domains = lsearch;/etc/blockeddomains

    /etc/blockeddomains file contains:

    domain.tld
    domain2.tld
    domain3.tld

    And my config section:



    ######################################################################
    # ROUTERS CONFIGURATION #
    # Specifies how remote addresses are handled #
    ######################################################################
    # ORDER DOES MATTER #
    # A remote address is passed to each in turn until it is accepted. #
    ######################################################################

    # Remote addresses are those with a domain that does not match any item
    # in the "local_domains" setting above.


    Section: PREROUTERS
    reject_domains:

    driver = redirect
    # RBL Blacklist incoming hosts
    domains = blocked_domains
    allow_fail
    data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.


    But domain.tld or domain2.tld or domain3.tld can send email via php and exim flag like "Queued" not "Frozen"...

    What i did wrong? What i must setup to block entirely domain and get frozen?

    Regards!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Is the PHP script using SMTP authentication to send email, or is it using the PHP "mail" function?

    Thank you.
     
  3. Patricio Segovia

    Joined:
    Feb 27, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chile
    cPanel Access Level:
    Root Administrator
    How i can view that? i think its php mail cuz from email was some random name @domain.tld, maybe?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You'd need to review the contents of the individual scripts to determine how they are sending out email. It's likely through the PHP mail command, you'd need to see if there's an option to switch to SMTP authentication in the script, or consider blocking the PHP mail function per the instructions at:

    Stop account from using mail()

    Thank you.
     

Share This Page