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 spam email from my server.

Discussion in 'Security' started by Jinesh Thacker, Apr 7, 2015.

  1. Jinesh Thacker

    Jinesh Thacker Registered

    Joined:
    Apr 7, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Spammers put some php scripts on my server and It sent out 92552 emails.

    I tried scanning this file - Removed -

    It did not detect any malware. Even Maldetect did not.

    I have an idea to block this spam. I don't know if it will work. Since this spamming scripts add a random username @ mydomain.com.

    So is there any way I can block the email if its not on the whitelist of usernames?

    For e.g. block anything that is not support @ mydomain.com and account @ mydomain.com.

    Is this possible? Is there any other way to block this scripts?
     
    #1 Jinesh Thacker, Apr 7, 2015
    Last edited by a moderator: Apr 7, 2015
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Try this script to find the exact location of the spamming scripts :

    Code:
     awk '{ if ($0 ~ "cwd" && $0 ~ "home") {print $3} }' /var/log/exim_mainlog | sort | uniq -c | sort -nk 1
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, as mentioned, it's a good idea to determine the source of the SPAM and to delete the offending script. You may also find the following document helpful:

    cPanel - Prevent Email Abuse

    Thank you.
     
Loading...

Share This Page