• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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='test@example.com';
$from= 'test@test.com';
$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 test@test.com to test@example.com

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