SUMMARY: mqueue error

From: Operator (root@hivnet.ubc.ca)
Date: Tue Mar 30 1993 - 03:18:29 CST


My original problem:

>
>I tried using "cat" of the files in /var/spool/mqueue to check that all of
>the people on an email list were getting the group messages. Now, I am getting>an occasional error message on the console:
>
>cartnet sendmail[1925]: NOQUEUE: SYSERR: cannot chdir(/usr/spool/mqueue): Permission denied
>
> I compare the permissions on this directory with those of another Sun and
> they are identical. This was true for /usr/spool and /var/spool, but I
> found that the permission on /usr on this machine was
>
> cartnet{root}149: ls -ldg /usr
> drwxr-sr-x 37 root wheel 1024 Mar 9 02:49 /usr
>
> On the other Suns, the permissions were:
> drwxr-xr-x 33 root wheel 1024 Feb 11 11:40 /usr
>
>
> The error message comes up when we use
>
> mail -s "Subject of Our Message" < filename
>
> or
>
> cat filename | mail -s "Another Message Subject"
>
> The mail command fails in the above two cases.
>
> The message does not come up for all outgoing mail, but does come up on other
> occasions.
>
> I changed the permission on the /usr directory and the messages still come up.>
> We are running SunOs 4.1.2 on a Sun 4/630MP.
>

Well, I had thought that I had somehow done some damage when I was watching the
outgoing mail with the cat commnand. The error message is entirely a user
syntax error with the mail command. I did show how the user was producing
the error message, and I should have read the man pages to check the syntax
of the command, but I did not fully attribute the message to user error.

We were using email addresses with the above commands, and I should not have
left them out in my description of the problem. I got a few responses
indicating that I left out the email addresses on the command line. This is
not the cause of the error message.

Don Lewis provided the following information:

It sounds like you are using [/usr]/bin/mail instead of /usr/ucb/mail.
/bin/mail doesn't understand the -s option to set the subject, so it
just passes it on to sendmail as another argument. Sendmail thinks
that your are trying to do something dangerous, so it revokes its
setuid status. Since sendmail no longer has root permissions, it
can't chdir("/usr/spool/mqueue").

The cure is to use /usr/ucb/mail, which understands the -s subject option.
You can do this by making sure that /usr/ucb preceeds /bin and /usr/bin
in your path, or by using Mail instead of mail. /usr/ucb/Mail and
/usr/ucb/mail are linked together.

Thanks to
Don Lewis
Peter Shipley
Casper Dik
Jairo A. Medina
Per Hedeland
Glenn Satchell
Tobias Weingartner
Steve Lodin
Perry_Hutchison
Neil W Rickert
Randy Davis



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:39 CDT