• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Plesk sendmail wrapper does not handle child signals properly

danami

Silver Pleskian
---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk 12.0.18 CentOS 6 1200150126.15, x64

PROBLEM DESCRIPTION
User scripts are not able to send emails using Plesk's sendmail wrapper if they set $SIG{CHLD} = 'IGNORE'; in their code. This is happening with both qmail and postfix sendmail wrappers.

STEPS TO REPRODUCE
Example script:

Code:
#!/usr/bin/perl
$title='Perl Mail demo';
$to='[email protected]';
$from= '[email protected]';
$subject='foo';
$SIG{CHLD} = 'IGNORE';
open(MAIL, "|/usr/sbin/sendmail -t");
## Mail Header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
close (MAIL);

ACTUAL RESULT
Code:
# ./test.pl
plesk sendmail[17205]: waitpid failed (10): No child processes
A message has been sent from [email protected] to [email protected]

The maillog
Code:
Apr 13 07:39:51 plesk12 plesk sendmail[17206]: handlers_stderr: SKIP
Apr 13 07:39:51 plesk12 plesk sendmail[17206]: _mh_fork(): Error occured during waiting the child process with pid: 17207: No child processes
Apr 13 07:39:51 plesk12 plesk sendmail[17206]: Error during 'check-quota' handler
Apr 13 07:39:51 plesk12 plesk sendmail[17205]: waitpid failed (10): No child processes

No email is actually sent!

EXPECTED RESULT
The Plesk sendmail wrappers should be dealing with SIGCHLD itself regardless of what the user script sets.

ANY ADDITIONAL INFORMATION
--------------------------------------------------------------
I've confirmed that this is happening across different OS and arch, Centos 5, 6, 7 and Debian and Ubuntu also.
 
Last edited:
Back
Top