• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

How can I find what scripts are sending mail?

dragnovich

Basic Pleskian
Hello I had a server which was sending "suspiciusly" many emails "spam", and I was wondering how to detect WHAT scripts (PHP) are sending the emails using sendmail.

So googling, I found -

http://kb.parallels.com/en/1711

and I implemented it and, It really help me to detectet practically all scripts (PHP, PERL & CGI) that where involved in the SPAM attack, how ever this wrapper only LOGS from WHICH directory is been run the script not ACTUALLY which script does the mail sending. So If I get 4 or more (as an example) scripts that actually can send mail in a directory I cant know wich of those sent the email.

Is any way I can modify the wrapper to actually LOG the sender script?

For example right now, Im getting this in the mail log:

X-Additional-Header: /
The spam email in here .....

It appears to be sended from the root, and listing the root / directory there's no scripts or programs, links etc..

So how can I get the running path $PWD and the Caller script ?

Any help will be welcome
Regards
 
Last edited:
Back
Top