sendmail -q hangs


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sendmail -q hangs
# 1  
Old 10-04-2005
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  
Old 10-04-2005
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  
Old 10-06-2005
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  
Old 10-06-2005
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  
Old 10-06-2005
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  
Old 10-06-2005
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. Programming

Program Hangs

I have two programs, DriverScale.c and scale9.c. DriverScale.c calls scale 9.c which sends a W and a carraige return to the scale which SHOULD return the weight to DriverScale. However scale 9 hangs for at least 10 min, and then finally returns the weight. Compilation: ... (8 Replies)
Discussion started by: Meow613
8 Replies

3. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

4. IP Networking

SFTP hangs

Ok sftp connects but hangs after I enter the password manually The ssh version is 1.0 bash-2.05$ ssh -V SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. When I go from solaris 9 to sftp to another server with latest proftpd version it hangs after the password. proftpd -V Compile-time... (6 Replies)
Discussion started by: slufoot80
6 Replies

5. Red Hat

Xrdp hangs

Hi, I'm trying to get xrdp to work. I installed xrdp 0.5.0 from EPEL and the Desktop group. Now I can connect to the server with rdesktop, but I can't do any input... there is an authentication window asking the root password "to set the network proxy used for downloading packages" and I can't... (0 Replies)
Discussion started by: FrankVanDamme
0 Replies

6. UNIX for Advanced & Expert Users

SSH hangs

Hi all, At a little bit of loss here. I have a Linux box (Redhat Enterprise 4) that has been working flawlessly for a while, that is until late Tuesday when none of the users could ssh into it. The machine is in a DMZ over which I have no control of the network settings. Here is the debug output... (6 Replies)
Discussion started by: ccj4467
6 Replies

7. Solaris

System hangs

Hi, today when i started the OS Sun Solaris 10 it hangs on initialization. Following was shown in the end of the screen Initializing system Please wait.... * Please help? (3 Replies)
Discussion started by: malikshahid85
3 Replies

8. Shell Programming and Scripting

Script Hangs!

Hi, I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime. Code snippet set l_temp_timeout $timeout OUTPUT_LOG2 2 >>>$expect_out(buffer)<<< OUTPUT_LOG2 2... (2 Replies)
Discussion started by: naveenpn
2 Replies

9. AIX

sysback hangs

I've set sysback to run in the cron daily to backup my servers to a nim servers SAN storage. Every once and a while the backup process hangs and the backup doesn't complete. When I check the processes the sysback processes are still running hours after sysback would normally end. I don't see any... (1 Reply)
Discussion started by: daveisme
1 Replies

10. AIX

HMC Hangs

Hi Gurus ; I have few SP Nodes running and alongwith that there is a console. All running Aix 4.3. The console system use to monitor activities for other SP nodes but at a sudden the console stops responding without logging any error. We have to reboot everytime sometimes twice or thrice in... (0 Replies)
Discussion started by: yadwendrav
0 Replies
Login or Register to Ask a Question