Operating System - HP-UX
1834628 Members
3118 Online
110069 Solutions
New Discussion

cron jobs no longer sending email

 
SOLVED
Go to solution
Christa Foley
Occasional Advisor

cron jobs no longer sending email

My HP-UX 11.0 no longer sends email to the user that owns the cron. It used to work, but now it does not. I have another HP-UX server that does not have this problem. Any ideas?
9 REPLIES 9
S.K. Chan
Honored Contributor

Re: cron jobs no longer sending email

Anything unusual in /var/adm/cron/log file ? Is the cron daemon running ?
# ps -ef|grep cron
Mark Greene_1
Honored Contributor

Re: cron jobs no longer sending email

some things to check:

- check the mail log for errors
- check the output of mailq -v -d run as root for mail that has been delayed
- make sure sendmail is still running
- check the size of the user's mailbox; if you have disk quota's enabled or if the file system is full no new mail can get saved
- verify that the crontab hasn't changed
- verify that /etc/mail/sendmail.cf hasn't changed
- see if you can send mail from that login ID at the command line to that login ID

HTH
mark
the future will be a lot like now, only later
Christa Foley
Occasional Advisor

Re: cron jobs no longer sending email

Cron is running and cron jobs are completing successfully according to the log. It appears to be a sendmail problem. No mail is being delivered. The end of the output of mailq -v -d is as follows:

LAA25996 9501 20919501+Mar 27 11:15 swcron
(alias database unavailable)
swcron
KAA23391 245 21000260+Mar 27 10:45 root
(alias database unavailable)
swcron
KAA23382 9501 21009501+Mar 27 10:45 swcron
(alias database unavailable)
swcron
GAC13215 9277253 22626050 Mar 29 06:13 MAILER-DAEMON
(alias database unavailable)
(---:postmaster---)
root
CAE27629 9275602 23344639 Mar 29 02:05 MAILER-DAEMON
(alias database unavailable)
root
PAF20293 5940395 26039192 Mar 27 15:28 MAILER-DAEMON
(alias database unavailable)
(---:postmaster---)
root
LAD26402 5938744 26757781 Mar 27 11:20 MAILER-DAEMON
(alias database unavailable)
root
KAA09759 (no control file)

====finis: stat 0 e_id=NOQUEUE e_flags=1
#

ANY IDEAS?
Jeff Schussele
Honored Contributor

Re: cron jobs no longer sending email

Hi,

You've lost or corrupted your /etc/mail/aliases or the .dir or .pag file(s).
It can be built or rebuilt with the sendmail -bi command.
See man sendmail for details.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor
Solution

Re: cron jobs no longer sending email

If you run /usr/sbin/newalises I think it would report some kind of error as well, it looks like sendmail could not locate the alias file. How does your system gets the alias file from ? Is it from NIS or locally ? Check /etc/nsswitch.conf, for example if the it is NOT suppose to get it from NIS, it should say just .. compare this with other similar system that works fine.

aliases: files

someone_4
Honored Contributor

Re: cron jobs no longer sending email

Hello
check /etc/mail for
aliases
and
aliases.db

if you dont have aliases copy it over form:
/usr/newconfig/etc/mail/aliases

then run
sendmail -bi
and stop and start sendmail
/sbin/init.d/sendmail sotp
/sbin/init.d/sendmail start

if you already have aliases and not the .db just do
sendmail -bi
and stop and start sendmail
/sbin/init.d/sendmail sotp
/sbin/init.d/sendmail start

Richard
Mark Greene_1
Honored Contributor

Re: cron jobs no longer sending email

after doing what Richard suggested above, you can then run (as root) this to force flush the mailq:

/usr/sbin/sendmail -or2h -q

and then do mailq -v too see if they all went.

mark
the future will be a lot like now, only later
Jeff Schussele
Honored Contributor

Re: cron jobs no longer sending email

Hi Christa,

Clarification...aliases.dir & aliases.pag are ONLY created/needed if you are using NIS or NIS+
The .db is all you need if you're not.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Christa Foley
Occasional Advisor

Re: cron jobs no longer sending email

I don't believe the alias files were the exact problem. S.K. Chan seemed to hit the problem. In the nsswitch.conf file, aliases were pointing to NIS and we are not running NIS. I fixed this and restarted sendmail. Now all seems to be well. Thank you all for your help.