Link to home
Start Free TrialLog in
Avatar of Peter Kwan
Peter KwanFlag for Hong Kong

asked on

[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
From: $MAIL_FROM
To: $MAIL_TO
Subject: $SUBJECT
Content-Type: text/plain; charset="utf-8"

TEST Content

EOF

/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:

/var/spool:
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.
Avatar of anfi
anfi

0) Which sendmail version do you use? [I suspect sendmail-8.12+ problem]
http://www.sendmail.org/faq/section4.html#4.16
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
http://www.sendmail.org/secure-install.html
Avatar of Peter Kwan

ASKER

0) 8.12.0
1) No
2) We are using our own cf and mc files. Is this ok?
SOLUTION
Avatar of anfi
anfi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all for contribution. Both works.