[Urgent!] Sending Email Problem in Solaris 9

Posted on 2006-04-09
Last Modified: 2013-12-17
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.
Question by:Peter Kwan
    LVL 6

    Expert Comment

    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/
    [ sendmail-8.12+ uses *TWO* cf file. can be generated from ]

    Permissions for non set root id (default) installation of sendmail-8.12+ are described at
    LVL 16

    Author Comment

    by:Peter Kwan
    0) 8.12.0
    1) No
    2) We are using our own cf and mc files. Is this ok?
    LVL 6

    Assisted Solution

    2) OK but you need anyway (in default sendmail-8.12+ installation mode) provided by 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).
    LVL 27

    Accepted Solution

    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'
    LVL 16

    Author Comment

    by:Peter Kwan
    Thanks all for contribution. Both works.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    New-MailboxSearch Powershell Command and step by step approach to Search and Extract Emails form Exchange 2013 Journaling server.
    Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
    In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now