Skip to main content

trickle of unatuhorized email being sent from local

Comments

4 comments

  • cPanelMichael
    Hello :) The message logs you provided show that mail is coming from: /home/$username/public_html Check that directory for scripts with the ability to send out email. Thank you.
    0
  • cPanelPeter cPanel Staff
    Hello, I would search the public_html folder for the mail() function... # grep -r 'mail(' *
    I'm betting some PHP script or plugin for WordPress/Joomla or other CMS software is poorly written and sending spam out.
    0
  • sjwrick
    Yep it is a wordpress install there. Will analyze. [COLOR="silver">- - - Updated - - - soooo many choices. Lots of work to do. :-(
    0
  • quizknows
    Grepping recursively for the PHP mail function is a crap chute. First, check output from ps faux for any suspect PID's running as that user. Second, take the exact timestamp from one of the messages in exim mainlog, and try to match that up to the exact same time in the domains access logs. This is a much better way to search for spam from scripts. If that still leaves you scratching your head, clamav or maldet might find the script(s) if there is a malicious PHP mailer. Sometimes mail is sent from legitimate files (such as a "tell a friend" feature), so virus scanners won't find that. last ditch effort would be checking crontab or possibly grepping for the php mail function, but a lot of spam scripts just use an eval or exec call, or encoded code that will avoid being found with that grep command. You're almost better off looking for base64() calls instead of mail().
    0

Please sign in to leave a comment.