1846594 Members
2431 Online
110256 Solutions
New Discussion

Re: sendmail problem

 
Sridhar R
Regular Advisor

sendmail problem

Hi,

I am unable to sendmail to my local domain.



Let me tell u in a detailed manner:

Domain Name: ashokleyland.com

My server is running HP-UX 11.23

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#

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



Kindly tell me what couls be done for this?

Thanks in Advance!!

Sridhar
7 REPLIES 7
Jeeshan
Honored Contributor

Re: sendmail problem

Hi Sridhar

Do you add the mail relay host in sendmail.cf file?

Which mail relay server you are using?
MS Exchange?
a warrior never quits
Sridhar R
Regular Advisor

Re: sendmail problem

Yes, i have added that.

Below is the sendmail.cf changes that i ve done.

#Dj$w.Foo.COM
Dj$w.ashokleyland.com

# "Smart" relay host (may be null)
DSmailrelay

Yes, mailrelay server is exchange.
Jeeshan
Honored Contributor

Re: sendmail problem

Hi Again

>># "Smart" relay host (may be null)
DSmailrelay

DS

Do you enable the mail relay from HP-UX permision in MS exchange server ?
a warrior never quits
Jeeshan
Honored Contributor

Re: sendmail problem

allow the HP-UX host in MS Exchange server and add the exchange server with its ip address in /etc/hosts file and also add this in DS entry in sendmail.cf file.

Example:
/etc/hosts

10.x.x.x exchange.ashokleyland.com exchange

sendmail.cf

DSexchange.ashokleyland.com

check the relay is ok

#echo test|sendmail -v sridhar.hp@ashokleyland.com
a warrior never quits
Sridhar R
Regular Advisor

Re: sendmail problem

Hi ahsan,

You mean, in other words,

Should the hosts file of the exchange server contain an entry for the HP-UX host?

Thanks!

Jeeshan
Honored Contributor

Re: sendmail problem

no

actually you must enable relay host entry in MS exchange server. and allow the HP-UX host in host relay properties.

only allow the hp-ux host.
a warrior never quits
Jeeshan
Honored Contributor

Re: sendmail problem

you can ask your windows or exchange administrator to do such enable.
a warrior never quits