mailx/sendmail configuration/set up problem

Hello Good People of Linux World!!!

Background: Recent Networking Graduate, thrown in line of fire.

For the past couple of days I have been searching online for answers and haven't gotten anywhere regarding Mailx, Sendmail functionality on SunOS 5.9.

My dilemma:
Mailx / sendmail are not sending emails (not inside or outside our network).

Machine:

SunOS tmusid01 5.9 Generic_118559-11 i86pc i386 i86pc 

Tried:

 echo "3PM" | mailx -s "Subject3PM" murtuza@live.ca

and it doesn't show any errors or such at that time.
But then, I get this email after a while

================================================================
From MAILER-DAEMON Thu Feb 17 15:16:31 2011
Date: Thu, 17 Feb 2011 14:49:45 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON@tmusid01.timelessmind.com>
To: root@tmusid01.timelessmind.com
MIME-Version: 1.0
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

This is a MIME-encapsulated message

--p1HJmjF0000450.1297972185/tmusid01.timelessmind.com

    **********************************************
    **      THIS IS A WARNING MESSAGE ONLY      **
    **  YOU DO NOT NEED TO RESEND YOUR MESSAGE  **
    **********************************************

The original message was received at Thu, 17 Feb 2011 10:44:27 -0500 (EST)
from root@localhost

   ----- Transcript of session follows -----
451 live.ca: Name server timeout
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

--p1HJmjF0000450.1297972185/tmusid01.timelessmind.com
Content-Type: message/delivery-status

Reporting-MTA: dns; tmusid01.timelessmind.com
Arrival-Date: Thu, 17 Feb 2011 10:44:27 -0500 (EST)

Final-Recipient: RFC822; murtuza@live.ca
Action: delayed
Status: 4.4.3
Last-Attempt-Date: Thu, 17 Feb 2011 14:49:45 -0500 (EST)
Will-Retry-Until: Tue, 22 Feb 2011 10:44:27 -0500 (EST)

--p1HJmjF0000450.1297972185/tmusid01.timelessmind.com
Content-Type: message/rfc822

Return-Path: <root>
Received: (from root@localhost)
        by tmusid01.timelessmind.com (8.12.10+Sun/8.12.10/Submit) id p1HFiRdn000809;
        Thu, 17 Feb 2011 10:44:27 -0500 (EST)
Date: Thu, 17 Feb 2011 10:44:27 -0500 (EST)
From: Super-User <root>
Message-Id: <201102171544.p1HFiRdn000809@tmusid01.timelessmind.com>
To:, murtuza@live.ca
Subject: Subject3PM

3PM

--p1HJmjF0000450.1297972185/tmusid01.timelessmind.com--
================================================================

What does this mean?
What configuration/log files should I be looking into?
What can be done to fix this problem?

I look forward from hearing and learning from you experienced campaigners.

Cheers,
Kazmi

I take it this is a sendmail client, sending to some sort of mail server (sendmail, exhange or otherwise). Did you make sure your sendmail.cf is setup to send to the correct server?

1 Like

I think this machine is acting as both the client and server in our instance as there aren't any other machines set up as "mail servers".

I could be wrong though, is there a way to find out?

Any specific configurations to set this machine as
1)client?
2)server?

What necessary changes should I be making in the sendmail.cf file?
I have looked in it and its about 1300+ lines, and had no idea what to do in it.

More help will be much appreciated.
Thanks,
Kazmi

What does your maillog say? It may be in /var/log/maillog

1 Like

/var/log/maillog does not exist on this machine :frowning:

I was trying to look for it earlier as well but did not find it.
There is a bunch of syslog, syslog.1syslog.2....syslog.7 files

Could it be logging mail instances to another location?

Look for sendmail logs in /var/log/ or /var/adm

cd /var/log
grep sendmail *
cd /var/adm
grep sendmail *

the following is from /var/log

cd /var/log
grep sendmail *

there are a lot more of these enteries in /var/log/syslog.8MK location I just copied the latest one.
 ==============================================================================================================
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[820]: [ID 801593 mail.info] p1HFmhKc000820: from=root, size=4565, class=0, nrcpts=1, msgid=<201102171543.p1HFh8An000803@tmusid01.timelessmind.com>, relay=root@localhost
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[821]: [ID 801593 mail.notice] p1HFmhK3000821: <box@tmusid01.timelessmind.com>... User unknown
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[820]: [ID 801593 mail.info] p1HFmhKc000820: to=box, ctladdr=root (0/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=34565, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[821]: [ID 801593 mail.info] p1HFmhK3000821: from=<root@tmusid01.timelessmind.com>, size=4565, class=0, nrcpts=0, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[820]: [ID 801593 mail.info] p1HFmhKc000820: p1HFmhKd000820: DSN: User unknown
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[821]: [ID 801593 mail.info] p1HFmhK5000821: from=<>, size=6429, class=0, nrcpts=1, msgid=<201102171548.p1HFmhKd000820@tmusid01.timelessmind.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[820]: [ID 801593 mail.info] p1HFmhKd000820: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=35589, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p1HFmhK5000821 Message accepted for delivery)
syslog.8MK:Feb 17 10:48:43 tmusid01 sendmail[822]: [ID 801593 mail.info] p1HFmhK5000821: to=<root@tmusid01.timelessmind.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=36659, relay=local, dsn=2.0.0, stat=Sent
syslog.8MK:Feb 17 10:49:43 tmusid01 sendmail[826]: [ID 801593 mail.info] p1HFnh5E000826: from=root, size=0, class=0, nrcpts=1, msg#

---------- Post updated at 04:37 PM ---------- Previous update was at 04:35 PM ----------

the following is from /var/adm
cd /var/adm
grep sendmail *
=========================================================
messages:Feb  1 02:00:40 tmusid01 sendmail[506]: [ID 801593 mail.crit] p1170dUe000506: SYSERR(cvsroot): Out of disk space for temp file
messages:Feb  2 01:59:56 tmusid01 sendmail[1476]: [ID 801593 mail.crit] p126xuaD001476: SYSERR(root): Out of disk space for temp file
messages:Feb  2 05:39:29 tmusid01 sendmail[1630]: [ID 801593 mail.crit] p12AdTaD001630: SYSERR(root): Out of disk space for temp file
messages:Feb  3 07:11:27 tmusid01 sendmail[2630]: [ID 801593 mail.crit] p13CBQ8n002630: SYSERR(cvsroot): Out of disk space for temp file
messages:Feb  4 05:16:16 tmusid01 sendmail[3577]: [ID 801593 mail.crit] p14AGGPC003577: SYSERR(cvsroot): collect: Cannot write ./dfp14AGGPC003577 (sm_io_flush||sm_io_error, uid=113, gid=25)
messages:Feb  5 04:25:35 tmusid01 sendmail[4549]: [ID 801593 mail.crit] p159PZRE004549: SYSERR(cvsroot): Out of disk space for temp file
df -k

Look for a filesystem at 100%.
It looks like may be /var full on you. Clean up time.

here is what if got after "df -k"

What should be my next step? Which one of the FSs should I clean up?

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0d0s0      4205630 4146189   17385   100%    /
/dev/dsk/c0d0p0:boot   11984    1593   10391    14%    /boot
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
swap                 2947316      24 2947292     1%    /var/run
swap                 2947292       0 2947292     0%    /tmp
/dev/dsk/c0d0s7      111909478 91741067 19049317    83%    /export/home

Well, your / directory is at 100%, and that's not very good.
/dev/dsk/c0d0s0 4205630 4146189 17385 100% /

I would go to the /var filesystem and start looking what you can remove. Look for large log files in /var/log that have been rolled up or compressed. You have /var/run on it's own partition, but not the entire /var fs, which kinda sucks for this very reason.

You have to be careful, but you have to find what to delete from /var. Perhaps you have a lot of old mail, or logs. I would definitely start in /var/log. Try this:

find /var/log -size +10000 -exec ls -lh {} \;

That should at least show you stuff that is around 1MB+.

would a file system being full (100%) effect mailx/sendmail??

---------- Post updated at 05:13 PM ---------- Previous update was at 05:09 PM ----------

The biggest file I have in my /var/log directory is 958KB
Next best place to delete things?

Yes. Sendmail write incoming and pending message into /var/spool/*. If can't write there, as evident by your sendmail errors in /var/adm/messages.

---------- Post updated at 04:16 PM ---------- Previous update was at 04:14 PM ----------

find /var -size +10000 -exec ls -lh {} \;

This will process everything in /var. BE CAREFUL!

Below is the listing of Items in /var
What do you suggest I take out?
I can always transfer them into my desktop for "back up" purposes

-rw-r--r--   1 root     other       8.5M Nov 30  2007 /var/sadm/install/contents
-rw-r--r--   1 root     other       8.7M Nov 30  2007 /var/sadm/install/t.contents
-rw-r--r--   1 root     root         12M Nov  9  2007 /var/sadm/wbem/logr/store
-rw-rw----   1 cvsroot  mail        1.2G Feb 17 02:10 /var/mail/cvsroot
-rw-r--r--   1 root     root        101M Mar 18  2008 /var/crash/tmusid01/vmcore.0
-rw-r--r--   1 root     root         89M Mar 18  2008 /var/crash/tmusid01/vmcore.1
-rw-r--r--   1 root     root        100M Mar 18  2008 /var/crash/tmusid01/vmcore.2

For starters you can remove all files from /var/crash :slight_smile:

Agreed.

Honestly, I would take some time to learn to see if you have available slices on your root disk to move /var to. Even with removing stuff from crash, your space is pretty tight.

Also, leave the CVSROOT alone, you seem to have source control running on that machine as well.

How can I find out if I have available slices on my root?

As bartus suggested, I removing files from crash.
That will give me about 300 MB of space

Also this might sound like a really dumb question, but what do you mean when you say I have "source control" running on this machine?

Thanks, I really really appreciate all your help.
I am learning a great bunch here !! =)

Well, CVSROOT usually belongs to CVS Concurrent Versions System - Wikipedia, the free encyclopedia

To find out of you have slices available on your disk, I would read this:
BigAdmin Submitted Article: The 'format' Utility in the Solaris Operating System
It's a lot to go through, but it will teach you a lot more than me just spitting out some commands that may not hit home for you.

If this box is going to be yours full time, most likely this will happen again, so I'd read it over.

So my / has gone down from 100% to 93% after removing those files.

/dev/dsk/c0d0s0      4205630 3847287  316287    93%    /

For now, my short term goal is to send an email out of this system.
What should be my next step as I have about 309M of free space on /

I skimmed through the "the format" utility link.
I will definitely make that link my reading over the weekend :slight_smile:

You probably should be able to send mail now. If not, just restart sendmail and try again.

I have restarted both the machine and sendmail, but email is still not getting delivered.

Could it have something to do with DNS? as it shows in the line below

----- Transcript of session follows -----
451 live.ca: Name server timeout

I get the following output after running nslookup.
# nslookup live.ca         
*** Can't find server name for address 192.168.2.1: Server failed
*** Can't find server name for address 198.235.216.131: No response from server
*** Default servers are not available

192.168.2.1 is the IP address of the router (gateway) that this box is connected to.
198.235.216.131 is the DNS address in the router.

Any suggestions?
You have been really helpful so far!!
Thanks