Bug 76449

Summary: sm-client hangs machine on init
Product: [Retired] Red Hat Linux Reporter: Need Real Name <egil>
Component: sendmailAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-03 08:54:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Suggested fix none

Description Need Real Name 2002-10-21 22:34:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
If QUEUE get set to "" in /etc/sysconfig/sendmail (haven't 
investigating the significance of this, but at least it happened
on my system when migrating from 7.3), then invoking sm-slient
completely hangs the machine when booting.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Set QUEUE="" in /etc/sysconfig/sendmail
2.Reboot
3.Wait forever

Of course, replacing step to by "/etc/init.d/sendmail restart" is
the preferred way of debugging this!	

Actual Results:  Machine hangs

Expected Results:  Machine should not hang!

Additional info:

In /etc/rc.d/init.d/sendmail, the sm-client is started up like this:
The problem seem to come from this line:

daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
                                $([ -n "$QUEUE" ] && echo -q$QUEUE)

Now, if QUEUE="", then there will not be a -q command line option.
This means that sendmail has no option indicating that it should run
as a deamon. Instead, it believes it should do its default "send mail"
thing, writes the error "Recipient names must be specified" and starts
waiting for stdin. 

There is a similar thing [i.e.$([ -n "$QUEUE" ] && echo -q$QUEUE] in starting
sendmail proper a few lines earlier, but in this case it
works because there is also a "-bd" option that indicates that 
daemon mode should be used.

I have a patch that I will attach - not sure if it is the best or right way,
but do have a look.

Comment 1 Need Real Name 2002-10-21 22:36:01 UTC
Created attachment 81424 [details]
Suggested fix

Comment 2 Florian La Roche 2003-01-03 08:54:40 UTC
Should be fixed in current rawhide rpm.

Thanks,

Florian La Roche