The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AIX hangs on boot drchris AIX 6 01-11-2008 08:24 AM
ssh + clearcase hangs sunilav UNIX for Advanced & Expert Users 2 05-03-2007 06:53 PM
Grep hangs zam Shell Programming and Scripting 2 09-04-2006 04:23 AM
AIX Hangs vipin77 AIX 5 07-22-2005 09:54 AM
Fedora (C2) Hangs Karma Slackware 1 10-27-2004 06:29 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2005
chaandana chaandana is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 49
sendmail -q hangs

Hi,

I have a system where sendmail deamon not running.
(And I have lot of jobs under crontab).
But I have whole lot of sendmail processes started-up by cron process, eating up its CPU resources. (for a sample - see below)
$ ps -ef|grep 248
root 248 1 0 Aug 12 ? 0:56 /usr/sbin/cron
root 11861 248 0 Sep 26 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi
root 7328 248 0 Oct 02 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi
root 14735 248 0 Sep 26 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi
root 25825 248 0 Oct 03 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi
root 16386 248 0 Sep 30 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi

When I tried to startup the deamon as used in the cron executable like:
"/usr/lib/sendmail -q" I get errors: (see below)
# /usr/lib/sendmail -q
hash map "Alias0": missing map file /etc/aliases.db: No such file or directory
dbm map "Alias0": missing map file /etc/aliases
Operating system error
Operating system error

But If I run the command like this: "/usr/lib/sendmail -q15m", then it works fine.

1. How to get rid of following type of processes:
"root 14735 248 0 Sep 26 ? 0:00 sh -c if [ -x /usr/lib/sendmail ]; then /usr/lib/sendmail -q; fi"

My system details:
$ uname -i
SUNW,Ultra-60
$ uname -a
SunOS stib2 5.8 Generic_117350-26 sun4u sparc SUNW,Ultra-60s:

Thanks in advance.
  #2 (permalink)  
Old 10-04-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Quote:
I have a system where sendmail deamon not running.
That is a good thing - sendmail shouldn't be running on most servers (security issue)

Quote:
But I have whole lot of sendmail processes started-up by cron process, eating up its CPU resources.
Probably because when sendmail isn't running, some folks have found that their email gets stuck on the server for one reason or another - so they schedule a cron job to push the email out.

Quote:
When I tried to startup the deamon as used in the cron executable like:"/usr/lib/sendmail -q" I get errors: (see below)
# /usr/lib/sendmail -q
hash map "Alias0": missing map file /etc/aliases.db: No such file or directory
dbm map "Alias0": missing map file /etc/aliases
Operating system error
Operating system error
Then your sendmail isn't set up correctly - it isn't finding all the files it should - the aliases and aliases.db should be links from /etc to /etc/mail on Solaris 8.
Try running the following to see if any other errors are present (your output will be different - this one shows no errors):
$ /usr/lib/sendmail -d0.1 -bt < /dev/null

Version 8.13.4
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
TCPWRAPPERS USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = localhost.localdomain
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>



Quote:
But If I run the command like this: "/usr/lib/sendmail -q15m", then it works fine.
I believe it doesn't run fine - it's just waiting 15 minutes and then would have the same error as the others that run immediately.

Quote:
1. How to get rid of following type of processes:
Your real problem is to fix the issues with sendmail. Then the cron jobs should start working.
  #3 (permalink)  
Old 10-06-2005
chaandana chaandana is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 49
HI RTM

You are right - my sendmail is not working well.
I executed that command. It gives me warnings to say that there is a version mismatch. What shall I do ?

# /usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.11.7p1+Sun
Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS
QUEUE SCANF SMTP USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = stib2
(canonical domain name) $j = stib2.sol.mydomain.com
(subdomain name) $m = sol.mydomain.com
(node name) $k = stib2
========================================================

Warning: .cf file is out of date: sendmail 8.11.7p1+Sun supports version 9, .cf file is version 8
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>

Last edited by RTM; 10-06-2005 at 09:39 AM..
  #4 (permalink)  
Old 10-06-2005
chaandana chaandana is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 49
Hi RTM,

I checked the sendmail.cf file. It contains this:
# level 8 config file format
V8/Berkeley

So, I checked another system and found a file with - version 9
# level 9 config file format
V9/Sun

Then I copied the file over to our server.
Now it does not warn when I execute "/usr/lib/sendmail -d0.1 -bt < /dev/null"

Do you think that this is a possible solution ?

Regards
Chaandana
  #5 (permalink)  
Old 10-06-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
That will fix your version error - but what changes between the old sendmail.cf and the one you placed over there? You can't just pop stuff in there and hope for the best. You have to check that both are set up the same - some of the things that folks do is change the domain, where the mail goes to (the mailhost they are using). Most of this stuff is in the top third of the file. But other things could also be changed. I wouldn't say it's a good solution. It may work, but realize you could have changed other parameters by using that file.

Have you solved your /etc/aliases errors? Did you test if email is now working?

(Note: I changed your info that you posted - you should, as a personal rule, not put your full domain in any post unless it is really needed)

Last edited by RTM; 10-06-2005 at 10:10 AM..
  #6 (permalink)  
Old 10-06-2005
chaandana chaandana is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 49
Hi RTM,

I'm not using sendmail in the box.
I just wanted to suppress that unwanted sendmail processes invoked by cron.
It seems that my solution has worked. No more sendmail processes are there now.
No any other errors encountered.
Thanks! but however that domain name was a bogus one. Anyway, your "mydomain" is a good choice.

Thanks for the help!

Chaandana
Closed Thread

Bookmarks

Tags
sendmail

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0