• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1290
  • Last Modified:

[Urgent!] Sending Email Problem in Solaris 9

I am using sendmail in Solaris 9 to send mail. The following is the command in my shell script:

cat <<EOF > tmp-mail.txt
MIME-Version: 1.0
Subject: $SUBJECT
Content-Type: text/plain; charset="utf-8"

TEST Content


/usr/lib/sendmail -t -n < tmp-mail.txt

I have looked at the /var/adm/messages log, and found the following:
Apr 7 18:13:20 ziong sendmail[24754]: [ID 801593 mail.crit] NOQUEUE: SYSERR(abc): can not chdir(/var/spool/mqueue/): Permission denied
Apr 7 18:13:52 ziong sendmail[24818]: [ID 801593 mail.crit] NOQUEUE: SYSERR(abc): can not chdir(/var/spool/mqueue/): Permission denied

I am running the script as root, and the following is the permission of /var/spool/mqueue:

dr-xr-x--- root bin mqueue

The sendmail daemon is started as root (checked by ps -ef | grep sendmail).

The problem is I cannot receive any email that is generated by my script. Can someone please help?

This question is very urgent, and need the solution ASAP. Thanks you very much.
Peter Kwan
Peter Kwan
  • 2
  • 2
2 Solutions
0) Which sendmail version do you use? [I suspect sendmail-8.12+ problem]
Subject: Q4.16 -- How do I find sendmail's version number?

1) Is /var/spool/mqueue/ located on NFS mounted partition

*IF YOU USE sendmail-8.12+*
2) Do you have /etc/mail/submit.cf?
[ sendmail-8.12+ uses *TWO* cf file. submit.cf can be generated from submit.mc ]

Permissions for non set root id (default) installation of sendmail-8.12+ are described at
Peter KwanAnalyst ProgrammerAuthor Commented:
0) 8.12.0
1) No
2) We are using our own cf and mc files. Is this ok?
2) OK but you need submit.cf anyway (in default sendmail-8.12+ installation mode)

submit.cf provided by sendmail.org can be used without modifications in almost all sendmail-8.12+ istallations. It is responsible for transmitting locally submitted messages via to main sendmail daemon running as root. It allowed to scrap need to installing sendmail as set root id (source of many security risks).

sendmail is already setgid to smmsp, you don't need to change something
just use this command:

/usr/lib/sendmail -t -n -f uid < tmp-mail.txt

where uid is your solaris user name (from which mail is sent) it may be 'nobody'
Peter KwanAnalyst ProgrammerAuthor Commented:
Thanks all for contribution. Both works.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now