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!

Check which script or file sending spam mail

Discussion in 'E-mail Discussion' started by sahil3x1, Feb 7, 2017.

Tags:
  1. sahil3x1

    sahil3x1 Registered

    Joined:
    Oct 23, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    how i can check which script or file sending spam mail

    i made ticket 2-3 times that one of my account sending spam mails n they told that php
    file sending that remove that file can you tell me that command so i can check myself every time and how i can stop them
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    274
    Likes Received:
    21
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    It needs a course of commands to find the script that is spamming , the logs and the outputs needs to be monitored.

    still.... use the below command to see from where the spams are initiating.

    head -1 /var/log/exim_mainlog | awk '{print $1}' ; awk '$3 ~ /^cwd/{print $3}' /var/log/exim_mainlog | sort | uniq -c | sed "s|^ *||g" | sort -nr | head --lines 15 | egrep -v ' cwd=(/$|/etc/csf|/var/spool/exim)' ; tail -1 /var/log/exim_mainlog | awk '{print From $1}'
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    43
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,
    You have to find out spamming php script using below command also.
    Code:
    tail -n 1000 /var/log/exim_mainlog | grep /home
    
    The above command will display the spam script path.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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