Operating System - HP-UX
1752574 Members
4560 Online
108788 Solutions
New Discussion

mail stopped being delivered when Netw Admi decided to resolve names using DNS

 
NDO
Super Advisor

mail stopped being delivered when Netw Admi decided to resolve names using DNS

 

Hi

 

I need some help, on this, I have a number of hp-ux servers as well as other unix like O.S. servers running and up until now, a simple command like the below, would prompted a particular user to receive an email, so email alerts were configured.

But some how there was a need to change network configuration, and the Net Admins asked us to include in /etc/resolv.conf some entries. Ever since we no longer receive emails from the servers. Is there a way to overcome that?

date | mailx -s "test" xxx.yyyy@zzz.co.vv 
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: mail stopped being delivered when Netw Admi decided to resolve names using DNS

What does /var/adm/syslog/mail.log show?

 

Also, what does the 'mailq' command show?

 

Those 2 places are always a good place to start when looking for problems with mail.

 

Also you can do something like:

 

echo "test" | /usr/sbin/sendmail -v xxx@yyy.com

 

to see the verbose output from sendmail.

 

 

NDO
Super Advisor

Re: mail stopped being delivered when Netw Admi decided to resolve names using DNS

the mail log:

tail var/adm/syslog/mail.log
Jun 16 15:28:49 itc01 sm-mta[12516]: t5GCA6jv005406: SYSERR(root): NIS map mail.aliases specified, but NIS not running
Jun 16 15:58:54 itc01 sm-mta[14159]: t5GCA6jv005406: SYSERR(root): NIS map mail.aliases specified, but NIS not running
Jun 16 16:00:00 itc01 sendmail[14187]: t5GE004l014187: from=root@itc01.mcel.co.mz, size=464, class=0, nrcpts=3, msgid=<201506161400.t5GE004l014187@itc01.mcel.co.mz>, relay=root@localhost
Jun 16 16:00:00 itc01 sendmail[14189]: t5GE004l014187: to=jcuvelo@mcel.co.mz,fretagi@mcel.co.mz,amucuna@mcel.co.mz, ctladdr=root@itc01.mcel.co.mz (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=180464, relay=192.168.1.39, dsn=5.1.2, stat=Host unknown (Name server: 192.168.1.39: host not found)
Jun 16 16:00:00 itc01 sendmail[14189]: t5GE004l014187: SYSERR(root): NIS map mail.aliases specified, but NIS not running
Jun 16 16:00:00 itc01 sendmail[14189]: t5GE004l014187: t5GE004k014189: DSN: NIS map mail.aliases specified, but NIS not running
Jun 16 16:00:00 itc01 sendmail[14189]: t5GE004k014189: to=root@itc01.mcel.co.mz, delay=00:00:00, mailer=local, pri=31830, stat=queued
Jun 16 16:25:48 itc01 sendmail[15598]: t5GEPmPx015598: from=root, size=5, class=0, nrcpts=1, msgid=<201506161425.t5GEPmPx015598@itc01.mcel.co.mz>, relay=root@localhost
Jun 16 16:25:48 itc01 sendmail[15598]: t5GEPmPx015598: to=fretagi@mcel.co.mz, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30005, relay=192.168.1.39, dsn=5.1.2, stat=Host unknown (Name server: 192.168.1.39: host not found)
Jun 16 16:25:48 itc01 sendmail[15598]: t5GEPmPx015598: SYSERR(root): NIS map mail.aliases specified, but NIS not running

the mailq:

#mailq
                /var/spool/mqueue (7 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
t5GE004k014189     2369 Tue Jun 16 16:00 MAILER-DAEMON
                 (NIS map mail.aliases specified, but NIS not running)
                                         root@itc01.mcel.co.mz
t5GCA6jv005406     1525 Tue Jun 16 14:10 MAILER-DAEMON
                 (alias database unavailable)
                                         root
t5GBSTof003340     1791 Tue Jun 16 13:28 MAILER-DAEMON
                 (alias database unavailable)
                                         root
t5G70424019654      354 Tue Jun 16 09:00 root
                 (alias database unavailable)
                                         root
t5G600Bk016878     2440 Tue Jun 16 08:00 MAILER-DAEMON
                 (alias database unavailable)
                                         root@itc01.mcel.co.mz
t5G4RJof012541     1686 Tue Jun 16 06:27 MAILER-DAEMON
                 (alias database unavailable)
                                         root
t5G000sB029683      245 Tue Jun 16 02:00 root
                 (alias database unavailable)
                                         oracle
                Total requests: 7

the echo :

 

/dead.letter... Saved message in /dead.letter

but other systems I have a different output:

 

tail /var/adm/syslog/mail.log
Jan 25 04:57:11 mceldev sendmail[7170]: t0P2R6t06609: SYSERR(root): hash map "Alias0": unsafe map file /etc/mail/aliases.db: Group writable directory
Jan 25 04:57:11 mceldev sendmail[7170]: t0P2R6t06609: SYSERR(root): dbm map "Alias0": unsafe map file /etc/mail/aliases: No such file or directory
Jan 25 04:57:11 mceldev sendmail[7170]: t0P2R6t06609: SYSERR(root): NIS map mail.aliases specified, but NIS not running
Jan 25 04:57:11 mceldev sendmail[7170]: t0P2R6t06609: SYSERR(root): Error writing control file ./tft0P2R6t06609: No space left on device
Jan 25 05:27:16 mceldev sendmail[7806]: grew WorkList for /var/spool/mqueue to 2000
Jan 25 05:27:16 mceldev sendmail[7806]: grew WorkList for /var/spool/mqueue to 3000
Jan 25 05:27:16 mceldev sendmail[7806]: t0P2R6t06609: SYSERR(root): hash map "Alias0": unsafe map file /etc/mail/aliases.db: Group writable directory
Jan 25 05:27:16 mceldev sendmail[7806]: t0P2R6t06609: SYSERR(root): dbm map "Alias0": unsafe map file /etc/mail/aliases: No such file or directory
Jan 25 05:27:16 mceldev sendmail[7806]: t0P2R6t06609: SYSERR(root): NIS map mail.aliases specified, but NIS not running
Jan 25 05:27:16 mceldev sendmail[7806]: t0P2R6t06609: queueup: cannot create ./tft0P2R6t06609, uid=0: File exists
Jan 25 05:35:02 mceldev sendmail[7806]: t0P2R6t06609: SYSERR(root): Erromceldev[360]/
Patrick Wallek
Honored Contributor

Re: mail stopped being delivered when Netw Admi decided to resolve names using DNS

It looks like you have several issues.

 

1)  relay=192.168.1.39, dsn=5.1.2, stat=Host unknown (Name server: 192.168.1.39: host not found)

 

This is indicating that the host cannot be found. This could depend on how your name resolution is set up. If you are using only DNS then you may need to change your /etc/nsswitch.conf file so that it can look at both local files and DNS.

 

2) Jun 16 16:25:48 itc01 sendmail[15598]: t5GEPmPx015598: SYSERR(root): NIS map mail.aliases specified, but NIS not running

 

It looks like you may have NIS stuff specified in your /etc/nsswitch.conf file. If you do, and you don't have NIS running then that needs to be removed.

 

3) From the mailq command - (alias database unavailable)

 

Run the command 'newaliases' on your server to rebuild the /etc/mail/aliases file

 

 

Fix all of these and try sending mail again.

 

NDO
Super Advisor

Re: mail stopped being delivered when Netw Admi decided to resolve names using DNS

my /etc/nsswitch.conf file looks like the following:

cat /etc/nsswitch.conf
#
# /etc/nsswitch.hp_defaults:
#
# @(#)
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd:       compat
group:        compat
hosts:        files dns
ipnodes:      dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks:     nis [NOTFOUND=return] files
protocols:    nis [NOTFOUND=return] files
rpc:          nis [NOTFOUND=return] files
publickey:    nis [NOTFOUND=return] files
netgroup:     nis [NOTFOUND=return] files
automount:    files nis
aliases:      files nis
services:     nis [NOTFOUND=return] files
itc01[458]/ #

So I beleive the line "hosts: files dns" is correct

 

so I dont quite understand why when I run sendmail it returns "save in dead.letter"

 

sendmail -v fretagi@mydomain.com
Hello.
.
/dead.letter... Saved message in /dead.letter
itc01[459]/ #

Please can I have some help?

NDO
Super Advisor

Re: mail stopped being delivered when Netw Admi decided to resolve names using DNS

problem solved , I have put the FQDN of the server DS macro of sendmail.cf file