• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Sendmail, spam and mail.add_x_header

JuanCar

Regular Pleskian
Well I've a lot of spam from my server, under Plesk 11.5, php 5.4

Reading head of mails I've found

qmail 31475 invoked by uid 48

This 48 is the uid of Apache, so I suppose the script is owned by Apache, doesn't it?

Then I added to php.ini 2 lines (new from php 5.3)

mail.add_x_header = On
mail.log = /var/log/php-mail.log

(and then restarted Apache)

I hope that header mails contains information about the script using sendmail and a log file (/var/log/php-mail.log). OK?
Well, there is no info in mail header nor php-mail.log!!!!! Why?

I tested it with a form contact using the php function mail(). The form sent the mail but without info in header and log file was not created.

Where is the error?

Then I used a sendmail wrapper

#!/bin/sh

logger -p mail.info sendmail: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, filename=${SCRIPT_FILENAME}, docroot=${DOCUMENT_ROOT}, pwd=${PWD}, uid=${UID}, user=$(whoami)

echo "Hello" | /var/qmail/bin/sendmail.cerrado -f [email protected] [email protected]


(last line is for avoid the spam sent)

In the maillog I see

logger: sendmail: site=, client=, script=, filename=, docroot=, pwd=/var/www, uid=48, user=apache

user apache send the email but, how does it?
Where is the script name? or the filename?

Thanks









To locate the origin I renamed sendmail to sendmail-close and the spam dissapears: so I am sure this is from a script in the server
 
Hello,

I suggest you to install LMD on your server because hacker can upload the mailing scripts and php shell scripts on the server and you can find out that scripts through LMD scan. While checking the server I found that some domains are using base64 php file for sending the spam from server.
 
Back
Top