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 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:
    143
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,746
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    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