Operating System - HP-UX
1752551 Members
4610 Online
108788 Solutions
New Discussion юеВ

Re: sendmail configuration

 
Keith Johnson
Valued Contributor

Re: sendmail configuration

It looks as if you are not able to query your DNS server.

Check your /etc/nsswitch.conf and /etc/resolv.conf files to ensure they are configured correctly for how you want to do name resolution.

1. If you are using DNS for resolution, your /etc/nsswitch.conf file should have an entry like:

hosts: dns [NOTFOUND=continue TRYAGAIN=continue] files

And, your resolv.conf file should list the DNS servers for your site and should look like:

domain your.domain
nameserver
(Note that you can list up to 3 nameservers.

2. If you are using /etc/hosts as your only name resolution, make the hosts line in the /etc/nsswitch.conf file read:

hosts: files [NOTFOUND=continue]

Also in this scenario, if you have an /etc/resolv.conf file, move it elsewhere.

Once these are configured properly try an nslookup on the address to which you want to send mail.
No matter where you go...there you are.
mwagiru
Frequent Advisor

Re: sendmail configuration

/sbin/init.d/sendmail start
Starting sendmail [ OK ]
Starting sm-client [FAILED]
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

Shalom,

Hi, whats the OS? Sendmail on HP-UX doesn't do that(the smclient part).

I believe based on reading the entire thread and a sickening level of experience with sendmail that you have done everything right.

The relay server referred to in the DS directive is mishandling the mail. That server has a problem not the one you are working with.

SEP
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
mwagiru
Frequent Advisor

Re: sendmail configuration

The relay server is an MS Exchange server.
And yes, the OS is HP-UX 11.11i

Apparently, when I send mail to internal recipient it arrives but still shows a great deal of :
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11
;; res_query: send error
;; res_querydomain(172.31.100.69, , 1, 15)
;; res_query(172.31.100.69., 1, 15)
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.11


But finally :


;; res_query: send error
getmxrr: res_search(172.31.100.69) failed (errno=238, h_errno=2)
bwachira@safaricom.co.ke... Connecting to 172.31.100.69 via relay...
;; res_query(181.200.29.172.in-addr.arpa, 1, 12)
;; Querying server (# 1) address = 172.29.200.99
;; res_querydomain(lmsapp.safaricom.net., , 1, 1)
;; res_query(lmsapp.safaricom.net, 1, 1)
;; Querying server (# 1) address = 172.29.200.99
220 svdt1exch01.safaricom.net Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Wed, 7 Mar 2007 18:21:34 +0300
>>> EHLO lmsapp.safaricom.net
250-svdt1exch01.safaricom.net Hello [172.29.200.181]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
>>> MAIL From: SIZE=9 AUTH=root@lmsapp.safaricom.net
250 2.1.0 root@lmsapp.safaricom.net....Sender OK
>>> RCPT To:
>>> DATA
250 2.1.5 bwachira@safaricom.co.ke
354 Start mail input; end with .
>>> .
250 2.6.0 <200703071513.l27FDNSw015263@lmsapp.safaricom.net> Queued mail for delivery
bwachira@safaricom.co.ke... Sent ( <200703071513.l27FDNSw015263@lmsapp.safaricom.net> Queued mail for delivery)
Closing connection to 172.31.100.69
>>> QUIT
221 2.0.0 svdt1exch01.safaricom.net Service closing transmission channel
closemaps: closing host (NULL)
closemaps: closing dequote (NULL)


The email is sent ...so whats the problem ??
Keith Johnson
Valued Contributor

Re: sendmail configuration

Check the following link for information regarding the "Starting sm-client [FAILED]" error you're receiving, it may help.

http://www.sendmail.org/~ca/email/doc8.12/SECURITY

For your other error, mail not leaving your server, I still think it might be DNS related based on these error messages:

;; Querying server (# 1) address = 172.29.200.99
;; rcode = 3, ancount=0
NO: errno=0, h_errno=1
getcanonname(yahoo.com), trying files
text_getcanonname(yahoo.com)
getcanonname(yahoo.com), failed, status=68
yahoo.com: Name server timeout

So please try this command and let us know the result:

nslookup yahoo.com
No matter where you go...there you are.
mwagiru
Frequent Advisor

Re: sendmail configuration

nslookup yahoo.com
*** Warning - the local domain is not set.
*** Either hostname should be a domain name,
*** the domain should be specified in /etc/resolv.conf,
*** or the shell variable LOCALDOMAIN should be set.

Name Server: svdt1ad01.safaricom.net
Address: 172.29.200.99

Trying DNS
looking up FILES
*** No address information is available for "yahoo.com"
mwagiru
Frequent Advisor

Re: sendmail configuration

I included the domain in /etc/resolve.conf


nslookup yahoo.com
Name Server: svdt1ad01.safaricom.net
Address: 172.29.200.99

Trying DNS
looking up FILES
*** No address information is available for "yahoo.com"
mwagiru
Frequent Advisor

Re: sendmail configuration

Why does my sendmail attempt to resolve?
I want it to send all request to my relay server (Exchange Server) which is connected to the internet.

My Sun server has sendmail and it sends all requests to the Exchange Server which will take it from there.


Huh?????
Sameer_Nirmal
Honored Contributor

Re: sendmail configuration

You need to ask MS Exchange server administrator to add the host in the relay list. This will allow this host to send email outside world's domain.

Regarding sm-client error, you need to take a look at the error messages in /var/adm/syslog/mail.log

Unless otherwise required as mail server, you don't need to run sendmail as server.
mwagiru
Frequent Advisor

Re: sendmail configuration

Finally....
I found the culprit....I just commented out this line:

# pass to name server to make hostname canonical
#R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4

Thanks guys for your help!!!