Operating System - HP-UX
1834211 Members
2283 Online
110066 Solutions
New Discussion

Re: even local mail not working

 
Omar Alvi_1
Super Advisor

even local mail not working

Hi,

We have a system upgraded to HP-UX 11.11. As was the case before upgrade, a few sceduled backups were configured using sam with the option of sending logs as mail to root and other users. However no mail was forthcoming.

On testing mail independently, initally we got the following message
WARNING: local host name (abcde) is not qualified; fix $j in config file
On Fixing this, no more errors on running command, but no mail recieved either

And this is mail to users on the same system... shouldn't this be implemented out of the box? How to diagnose the issue?

Regards,

-Alvi
10 REPLIES 10
Omar Alvi_1
Super Advisor

Re: even local mail not working

Hi,

still working on this issue

The following are the messages I get in mail.log when I send an email.

Jul 11 12:00:00 hp11 sendmail[23103]: unable to qualify my own domain name (hp11) -- using short name
Jul 11 12:00:00 hp11 sendmail[23103]: be sure to set domain name in Dj macro in sendmail.cf
Jul 11 12:00:01 hp11 sendmail[23103]: MAA23103: from=root, size=185, class=0, pri=30185, nrcpts=1, msgid=<200407110900.MAA23103@hp11.>, relay=root@localhost
Jul 11 12:00:01 hp11 sendmail[23105]: MAA23103: to=root, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Can't create output
Jul 11 12:00:01 hp11 sendmail[23105]: MAA23103: MAA23105: DSN: Can't create output
Jul 11 12:00:01 hp11 sendmail[23105]: MAA23105: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Can't create output
Jul 11 12:00:01 hp11 sendmail[23105]: MAA23105: MAB23105: return to sender: Can't create output
Jul 11 12:00:01 hp11 sendmail[23105]: MAB23105: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Can't create output
Jul 11 12:00:01 hp11 sendmail[23105]: MAA23105: Saved message in /var/tmp/dead.letter

Any ideas?

Regards,

-Alvi
McKesson SystemCare UNI
Occasional Advisor

Re: even local mail not working

Hello Alvi,

First thing is check and make sure sendmail is running on your system with

ps -ef|grep sendmail

if it isn't then start the sendmail daemon.

If it is running check your sendmail.cf file and your alias file under /etc/mail to ensure that all your settings are correct there. And under /etc check your nsswithch and resolv.conf (if using DNS) files. These are all possibilities.

Hope this helps

James
Geoff Wild
Honored Contributor

Re: even local mail not working

What is in your /etc/nsswitch.conf?

hosts: files [NOTFOUND=CONTINUE] dns


Is the FQDN in /etc/hosts as well as short name?

XXX.XXX.XXX.XXX yourhost yourhost.yourdomain.com

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: even local mail not working

The 11.11 upgrade installs without a proper /etc/nsswitch.conf file

there are a couple of candidates

nsswitch.compat nsswitch.hp_defaults nsswitch.nisplus nsswitch.ldap
nsswitch.files nsswitch.nis


You need to pick the one that works best for you and maybe modify it and have an nsswtich.conf file.

Then you should probably restart the box. At the very least start and stop sendmail.

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

A diagnostic email will lead you to more inforamtion though a look at /var/adm/syslog/mail.log will tell you the same thing:

diagnostic:

sendmail -v -d8.99 -d38.99 someuser
type some text

.


This will at least lead you to the core Issue. I hope.

SEP
jerusalem
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Omar Alvi_1
Super Advisor

Re: even local mail not working

I was reading up on the issues with mail, and one said that while having mail in /var/mail/root or any other user, mail would not show anthing ... this meant some problem with the $MAIL variable.

I checked as my case seemed similar, I don't even have anything under /var/mail. How to correct this?

Thanks a lot for your responses ... don't worry about points ;)

Regards,

-Alvi

Geoff Wild
Honored Contributor

Re: even local mail not working

Does /var/mail exists?

If yes, permissions should be:

drwxrwxr-x 2 bin mail 8192 Jul 12 08:30 mail

In your .profile you should have:
MAIL=/var/mail/root

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
john kingsley
Honored Contributor

Re: even local mail not working

Check to make sure you can resolve your hostname:
nslookup hp11

If this doesn't return the correct IP address, cofigure system to resolve hosts locally for toubleshooting purposes. Set your /etc/nsswitch.conf to resolv hosts locally:
hosts: files

Then check your /etc/hosts file and make sure that you have at least one, and only one entry for hp11 and localhost(127.0.0.1).

Now try running:
nslookup hp11

Now check to see if you are still getting the same error message from sendmail.
Omar Alvi_1
Super Advisor

Re: even local mail not working

Still working on this

/var/mail permissions seem ok

drwxrwxr-x 2 bin mail 96 Jul 10 11:56 mail

sendmail is working fine

# ps -ef | grep sendmail

root 1057 1 1 Jul 10 ? 1:23 sendmail: accepting connections5

nslookup output is fine

no files under /var/mail
no /etc/nsswitch.conf ... although there are other nsswitch.compat, .files, .hp_defaults

/etc/resolv.conf file exists albeit with zero bytes

DNS is not in use.

$MAIL variable set only for user root

... and now the diagnostics output suggested by Steve,

# sendmail -v -d8.99 -d38.99 oracle
;; res_querydomain(hp11, , 1, 1)
;; res_query(hp11., 1, 1)
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; res_query: send error
getcanonname(hp11), trying dns
dns_getcanonname(hp11, trymx=1)
dns_getcanonname: trying hp11. (ANY)
;; res_querydomain(hp11, , 1, 255)
;; res_query(hp11., 1, 255)
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; res_query: send error
NO: errno=239, h_errno=2
getcanonname(hp11), failed, stat=75
seq_map_parse(aliases.files, )
;; res_query(3.1.0.10.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; res_query: send error
;; res_query(2.1.0.10.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; Querying server (# 1) address = 0.0.0.0
;; res_query: send error
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 1
files
map_stack[0] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(host:resolve, NULL, 0)
host:resolve NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
implicit:Alias0 /etc/mail/aliases: valid
map_init(host:host, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(switch:aliases, aliases, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(dequote:dequote, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(host:resolve, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
seq_map_lookup(aliases, oracle)
seq_map_lookup(aliases.files, oracle)
impl_map_lookup(Alias0, oracle)
db_map_lookup(Alias0, oracle)
### It hangs at the above line. I had to break to get back to prompt. Then I got the following lines
closemaps: closing aliases.files (NULL)
closemaps: closing Alias0 (/etc/mail/aliases)
impl_map_close(Alias0, /etc/mail/aliases, 12a3)
db_map_close(Alias0, /etc/mail/aliases, 12a3)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)
closemaps:

eh, messy, isn't it?

-Alvi
john kingsley
Honored Contributor

Re: even local mail not working

When the command hangs, it is waiting for you to type your mail message. At this point, go ahead and type your test message then enter

Also, go ahead and create a /etc/nsswitch.conf file. Copy /etc/nsswitch.files to /etc/nsswitch.conf. If you are running NIS, you will have to add the NIS fields later, but for now, keep things simple.

Omar Alvi_1
Super Advisor

Re: even local mail not working

even after defininf nsswitch.conf ... same issue

collected some sendmail defining information

On HP-UX 11.11 the presently installed patch is PHNE_28810

# sendmail -bs
220 hp11 ESMTP Sendmail 8.9.3 (PHNE_28810)/8.9.3; Sat, 10 Jul 2004 10:01:00 +)

# ll

total 0

# what /usr/sbin/sendmail

/usr/sbin/sendmail:

Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,

including Sendmail, Inc., and the Regents of the

University of California. All rights reserved.

version.c 8.9.3.1 (Berkeley) 05/05/2003 (PHNE_28810)

# cksum /usr/sbin/sendmail

2838985121 864256 /usr/sbin/sendmail