[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1280
  • 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 KwanAuthor 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 KwanAuthor Commented:
Thanks all for contribution. Both works.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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