Execution problems with Mailx

Unable to send mail using mailx command. I am using solaris 5.9 I am trying to send notification for the scheduled jobs in crob but the mailx is not working. Checked the settings in submit.cf and sendmail.cf
but unable to find the solution.

Error message

root@sshldb # nslookup mailhost
*** Can't find server name for address 127.0.0.1: No response from server
*** Default servers are not available
you have mail
 
 
root@sshldb # echo "Test Message" | mailx -v -s "test message" xyz@abc.com.sg
root@sshldb # xyz@abc.com.sg
... Connecting to [127.0.0.1] via relay...
220 sshldb.sshcorp.com ESMTP Sendmail 8.13.8+Sun/8.13.8; Mon, 2 Apr 2012 14:26:06 +0800 (SGT)
>>> EHLO sshldb.sshcorp.com
250-sshldb.sshcorp.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<apsprd@sshldb.sshcorp.com> SIZE=83
250 2.1.0 <apsprd@sshldb.sshcorp.com>... Sender ok
>>> RCPT To:<xyz@abc.com.sg>
>>> DATA
250 2.1.5 <xyz@abc.com.sg>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <xyz@abc.com.sg>... Connecting to ksenergy.com.sg via esmtp...
050 <xyz@abc.com.sg>... Connecting to mailhost.sshcorp.com via esmtp...
050 220 sshcorp.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Mon, 2 Apr 2012 14:08:18 +0800
050 >>> EHLO sshldb.sshcorp.com
050 250-sshcorp.com Hello [15.12.88.201]
050 250-AUTH=LOGIN
050 250-AUTH LOGIN
050 250-TURN
050 250-SIZE 31457280
050 250-ETRN
050 250-PIPELINING
050 250-DSN
050 250-ENHANCEDSTATUSCODES
050 250-8bitmime
050 250-BINARYMIME
050 250-CHUNKING
050 250-VRFY
050 250 OK
050 >>> MAIL From:<apsprd@sshldb.sshcorp.com> SIZE=367
050 530 5.7.3 Client was not authenticated
050 <apsprd@sshldb.sshcorp.com>... Connecting to local...
050 220 sshldb LMTP ready
050 >>> LHLO sshldb.sshcorp.com
050 250-sshldb
050 250-8BITMIME
050 250-ENHANCEDSTATUSCODES
050 250 PIPELINING
050 >>> MAIL From:<>
050 250 2.5.0 ok
050 >>> RCPT To:<apsprd>
050 >>> DATA
050 250 2.1.5 ok
050 354 go ahead
050 >>> .
050 250 2.1.5 apsprd OK
050 <apsprd@sshldb.sshcorp.com>... Sent
250 2.0.0 q326Q6U2004453 Message accepted for delivery
xyz@abc.com.sg... Sent (q326Q6U2004453 Message accepted for delivery)

Give the output of:

telnet relayservername 25

.............

thanks for your reply Susindram

root@sshldb # telnet relayservername 25
relayservername: Unknown host

kindly let me know where to define the mail host apart from /etc/host file

Hi Srinath,

Please give your relay server name.I guess your relay server name is mailhost.sshcorp.com and telnet to the mailhost.sshcorp.com IP.Please take IP from nslookup in cmd...

No need to specify the any where apart from main.cf.........

We need to enable mail access in relay host server first.Thats why i have asked telnet to your relay server.:slight_smile:

Oh! Bit confused as I am new to this platform
root@sshldb # telnet smtp.mail.apac.microsoftonline.com
Trying 207.46.62.153...

it struks here and the following is the result of nslookup

C:\Users\srinath>nslookup smtp.mail.apac.microsoftonline.com
Server: ksdibmdc01.kstech.com.sg
Address: 192.168.0.198
Non-authoritative answer:
Name: smtp.mail.apac.microsoftonline.com
Address: 207.46.62.153

check telnet smtp.mail.apac.microsoftonline.com 25...If comes trying.Please check with necessary team to allow relay access for your server.

Getting no reply

root@sshldb # telnet smtp.mail.apac.microsoftonline.com 25
Trying 207.46.62.153...

Thanks for your support. Let me check this connectivity and come back to you on the results

---------- Post updated at 09:07 PM ---------- Previous update was at 04:37 AM ----------

Hi Susi,

the one which i tried was the new server which is not working.
Here are the outcomes of the old one.

root@sshldb # ping smtp.sshcorp.com
smtp.sshcorp.com is alive
root@sshldb # nslookup smtp.sshcorp.com
*** Can't find server name for address 127.0.0.1: No response from server
*** Default servers are not available
root@sshldb # telnet smtp.sshcorp.com 25
Trying 15.12.88.10...
Connected to smtp.sshcorp.com.
Escape character is '^]'.
220 sshcorp.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Tue, 3 Apr 2012 10:02:14 +0800

I am able to ping the server but nslookup doesnt work.

Its should work.You can see telnet to the port 25 is connected state.Just try to send one test mail mailx -s test xyz@abc.com.sg..

Nslookup is a DNS problem.Please ignore...

No it is not working and this is the problem I am facing. It is not authenticating the client when i try through telnet

$ telnet smtp.sshcorp.com 25
Trying 15.12.88.10...
Connected to smtp.sshcorp.com.
Escape character is '^]'.
220 sshcorp.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Tue, 3 Apr 2012 14:32:05 +0800
helo ksenergy.com.sg
250 sshcorp.com Hello [15.12.88.201]
mail from: srinath@mydomain.com.sg
530 5.7.3 Client was not authenticated