• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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