Not able to receive emails after job execution

Hi,

we've configured mail on DB2 data studio DSWC console. (gave mail relay server details) it used to work fine. like whenever we schedule backup jobs from DB2 side, we used to get emails after job completion.

for some reason, it stopped working now.

Please see the below info messges from mail/syslogs on AIX.

 Feb 16 15:25:00 aixhost mail:info sendmail[12121]: t1DE4Jmo26017794: to=<myemail@example.com>, delay=3+06:20:41, xdelay=00:01:15, mailer=esmtp, pri=14252015, relay=example.com., dsn=4.0.0, stat=Deferred: Name server: example.com.: host name lookup failure
Feb 16 15:25:00 aixhost mail:info sendmail[12121]: t1DE69Rl23986378: to=<myemail@example.com>, delay=3+06:18:51, xdelay=00:00:00, mailer=esmtp, pri=14252017, relay=example.com., dsn=4.0.0, stat=Deferred: Name server: example.com. : host name lookup failure
aixhost# mailq

              /var/spool/mqueue (8 requests)
----Q-ID---- --Size-- -----Q-Time----- ------------Sender/Recipient------------
tdfdfvdfvd146666     1701 Fri Feb 16 09:04 <Data_Studio@aixhost>
                 (Deferred: Name server: example.com.: host name lookup failure)
                                         <myemail@example.com>
t1dfvdfv98564445    1712 Fri Feb 16 09:06 <Data_Studio@aixhost>
                 (Deferred: Name server: example.com.: host name lookup failure)
 

Note: we never gave the mail/relay server details on this particular aixhost. even though, i used to receive emails from data studio.

And we actually gave mail/relay server details in data studio console. mail server is "mailhost.net" ; but logs showing that realy=example.com

please provide your suggestions.

Thank you

if you send your e-mails to @example.com, first thing to do (and every e-mail client does) is to check mx record for the domain:

host -n -t mx example.com

if the domain has no mx record in DNS, the mail will be send to a server with IP of the domain:

host -n example.com

your message says, that sendmail couldn't find both of the record - neither 'mx' nor 'a' record for the domain example.com. Please address the issue to the DNS administrators of the domain.

Thank you agent.kgb

[root@AIXHOST]/>host -n -t mx example.com
example.com mail is handled (pri=20) by myexcz1p.domain.com
example.com mail is handled (pri=20) by myexcz7p.domain.com
example.com mail is handled (pri=10) by myexcz3p.domain.com
example.com mail is handled (pri=30) by mymail2hub.domain.com
example.com mail is handled (pri=20) by myexcz1p.domain.com
.....
....
example.com mail is handled (pri=20) by example.compacket size error (0 != 2ff225f3)

Please see the command output.
i can not ping " example.com " from anywhere. i can do nslookup, to see the ip. but not able to ping.

[root@AIXHOST]/>host -n example.com
 example.com has a address 200.x.x.x  
example.com mail is handled (pri=20) by myexcz1p.domain.com
example.com mail is handled (pri=20) by myexcz7p.domain.com
example.com mail is handled (pri=10) by myexcz3p.domain.com
.....
....
example.com mail is handled (pri=20) by example.compacket size error (0 != 2ff225f3)

do you want me to change anything on /etc/netsvc.conf or /etc/hosts or /etc/resolv.conf ?

thanks

your first mx host is:
example.com mail is handled (pri=10) by myexcz3p.domain.com
could you try to resolve its ip?

host -n myexcz3p.domain.com

and

host myexcz3p.domain.com

if output of both commands differs, then you have to change /etc/netsvc.conf to allow bind4 or remove the entry from /etc/hosts

Thanks for your reply.

Actually i can resolve it an address 10.x.x.x

and when i ran other command it is showing the same details. both are same.

in

/etc/netsvc.conf 
hosts=local,bind

And any other idea pls ?

like do i need to actaully configure sendmail on my LPAR ? like adding mail/relay server details in sendmail.cf file ?

no, you don't need.

  1. try to telnet to port 25 on every mail server, you see in mx records.
  2. try to send an e-mail using mail command on the server:
mail myemail@example.com

Thanks for your help.

port 25 is open on only one server. not on all other exchnage servers

I can only telnet to "mymail2hub.domain.com". and looks like mail command worked; it prompted for subject, cc details etc. but I did not get any email message.

Please see the errors below from logs.

logs
=====

Feb 17 16:09:53 aixhost mail:info sendmail[9374416]: t1HL9rHd9371656: from=root, size=78, class=0, nrcpts=1, msgid=<201502172109.t1HL9rHd9371656@aixhost.domain.com>, 

relay=root@localhost
Feb 17 16:10:41 aixhost mail:info sendmail[9834405]: t1HLAfJg9830514: from=root, size=11, class=0, nrcpts=1, msgid=<201502172110.t1HLAfJg9830514@aixhost.domain.com>, 

relay=root@localhost
Feb 17 16:11:08 aixhost mail:info sendmail[9373316]: t1HL9rHd9371656: to=myemail@example.com, ctladdr=root (0/0), delay=00:01:15, xdelay=00:01:15, mailer=esmtp, 

pri=30078, relay=example.com., dsn=4.0.0, stat=Deferred: Name server: example.com.: host name lookup failure


 aixmibd.log
=============
 
Wed Jan 21 14:28:28 EST 2015  Connect to SNMP agent on the host loopback failed,
will keep trying
Thu Jan 22 11:33:20 EST 2015  Connect to SNMP agent on the host loopback failed,
will keep trying
Fri Jan 30 23:56:20 EST 2015  Connect to SNMP agent on the host loopback failed,
will keep trying
Sun Feb 15 01:15:10 EST 2015  Connect to SNMP agent on the host loopback failed,
will keep trying

hostmibd.log
==============

 01/21/15 02:28:28 PM -  ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying
 01/22/15 11:33:20 AM -  ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying
 01/30/15 11:56:20 PM -  ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying
 02/15/15 01:15:09 AM -  ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying


snmpmibd.log
=============

 01/21/15 02:28:27 PM -  dpi_main.c (790) snmpmibd (4456584) is starting.
 01/22/15 09:15:08 AM -  dpi_main.c (1416) snmpmibd (4456584) is terminating.
 01/22/15 11:33:19 AM -  dpi_main.c (639) snmpmibd: 1473-665  Connect to SNMP agent failed, will keep trying.
 01/22/15 11:33:19 AM -  dpi_main.c (790) snmpmibd (3473408) is starting.
 01/29/15 09:28:57 PM -  dpi_main.c (1416) snmpmibd (3473408) is terminating.
 01/30/15 11:56:19 PM -  dpi_main.c (639) snmpmibd: 1473-665  Connect to SNMP agent failed, will keep trying.
 01/30/15 11:56:19 PM -  dpi_main.c (790) snmpmibd (3801216) is starting.
 02/13/15 05:47:46 PM -  dpi_main.c (1416) snmpmibd (3801216) is terminating.
 02/15/15 01:15:09 AM -  dpi_main.c (639) snmpmibd: 1473-665  Connect to SNMP agent failed, will keep trying.
 02/15/15 01:15:09 AM -  dpi_main.c (790) snmpmibd (3997826) is starting.
  • when i setup mail/realy server details in sendmail.cf file ; and i can receive email from aix lpar using sendmail command.

please let me know if you see anything from logs.

thanks much

the mail command didn't work - I still see in the logs "hostname lookup failure".
and it tries to resolve the wrong host - example.com. As for me it still seems like a DNS/name resolution problem. If you didn't change anything and it stopped working, ask your DNS admin.

could you also post your /etc/hosts?

Thanks much for your help

here is my hosts file entry

/etc/hosts

10.x.x.x        aixhost.domain.com
10.x.x.x        mailhost.abc.net
[aixuser@aixhost]/home/aixuser>

my aixhost and mail server are in different subnet, but it can reach.

/etc/netsvc.conf
hosts=local,bind

I think, we have added the above entry in netsvc.conf few days back. may be i need to revert and see ?

Thanks