1754273 Members
2774 Online
108813 Solutions
New Discussion юеВ

unable to sendmail

 
Sridhar R
Regular Advisor

unable to sendmail

Hi,

I am unable to sendmail to my local domain.

Let me tell u in a detailed manner:

Domain Name: ashokleyland.com

I have edited the /etc/mailsendmail.cf file and added the domain and uncommented.

My /etc/resolv.conf is:

vorap101#cat /etc/resolv.conf
domain ashokleyland.com
nameserver 10.200.221.1


And the sendmail fails with:

vorap101#echo test | sendmail -v sridhar.hp@ashokleyland.com
sridhar.hp@ashokleyland.com... Connecting to mailrelay via relay...
sridhar.hp@ashokleyland.com... Deferred: Name server: mailrelay: host name lookup failure
Closing connection to mailrelay


And the logs (/var/adm/syslog/mail.log) shows up as follows:

Apr 27 13:52:14 vorap101 sendmail[3966]: m3R8MEL03966: from=root, size=5, class=0, nrcpts=1, msgid=<200804270822.m3R8MEL03966@vorap101.ashokleyland.com>, relay=root@localhost
Apr 27 13:52:48 vorap101 sendmail[3966]: m3R8MEL03966: to=sridhar.hp@ashokleyland.com, ctladdr=root (0/3), delay=00:00:34, xdelay=00:00:34, mailer=relay, pri=30005, relay=mailrelay [10.1.220.2], dsn=4.0.0, stat=Deferred: Name server: mailrelay: host name lookup failure


And the mailq output is:

vorap101#mailq
/var/spool/mqueue (7 requests)
----Q-ID---- --Size-- -----Q-Time----- ------------Sender/Recipient------------
m3R89gd03782 5 Sun Apr 27 13:39 root
(reply: read error from mailrelay)
sridhar.hp@ashokleyland.com
m3R8MEL03966 5 Sun Apr 27 13:52 root
(reply: read error from mailrelay)
sridhar.hp@ashokleyland.com
m3R7cun03416 10 Sun Apr 27 13:08 root
(host map: lookup (ashokleyland.com): deferred)
sridhar.hp@ashokleyland.com
m3R8BxN03832 10 Sun Apr 27 13:41 root
(reply: read error from mailrelay)
sridhar.hp@ashokleyland.com
m3R8F0503858 10 Sun Apr 27 13:45 root
(reply: read error from mailrelay)
sridhar.hp@ashokleyland.com
m3R7Eh908741 10 Sun Apr 27 12:44 root
(host map: lookup (ashokleyland.com): deferred)
sridhar.hp@ashokleyland.com
m3R7LBU08825 12 Sun Apr 27 12:51 root
(host map: lookup (ashokleyland.com): deferred)
sridhar.hp@ashokleyland.com
vorap101#



Kindly tell me what couls be done for this?

Thanks in Advance!!

Sridhar
5 REPLIES 5
Sridhar R
Regular Advisor

Re: unable to sendmail

My /etc/hosts file looks like:

vorap101#cat /etc/hosts
## Configured using SAM by root on Mon Aug 6 16:00:53 2007
## Configured using SAM by root on Mon Aug 6 16:00:42 2007
# @(#)B11.23_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#

10.200.227.61 vorap101.ashokleyland.com vorap101
10.200.227.62 cdbap101.ashokleyland.com cdbap101
10.200.227.63 wwwap101.ashokleyland.com wwwap101
10.200.227.64 scmap101.ashokleyland.com scmap101
10.200.226.50 dmzbd101.ashokleyland.com dmzdb101
10.200.226.21 cbadb101.ashokleyland.com cbadb101
10.200.226.22 cbadb102.ashokleyland.com cbadb102
10.200.226.23 cbadb103.ashokleyland.com cbadb103
10.1.220.2 mailrelay.ashokleyland.com mailrelay
127.0.0.1 localhost loopback
Vitaly Karasik_1
Honored Contributor

Re: unable to sendmail

Sridhar,

Before test sendmail you should configure DNS for ashokleyland.com.
You should be able to get MX record for ashokleyland.com:

#host -t mx ashokleyland.com
Ivan Ferreira
Honored Contributor

Re: unable to sendmail

Sendmail won't lookup into the /etc/hosts table. Edit your sendmail configuration file and replace mailrelay with it's real ip address enclosed by brackets, like this [10.1.220.2].

This will tell sendmail to contact directly to that IP address and avoid DNS lookups.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Aashique
Honored Contributor

Re: unable to sendmail

Hi,
check your DNS is woring or not.
check your access file.


Thanks & Regards
Aashique
Aashique
Honored Contributor

Re: unable to sendmail

Hi,
check your DNS is working or not.
check your access file.


Thanks & Regards
Aashique