I know this issues has been discussed multiple times, i have gone through many such discussion but unfortunately i am still not able to solve the issue being faced.
I have configured the sendmail.cf with the smtp host name (Editing the entry starting with DS...)
Post that restarted the sendmail services. When executed the mailx command to send the mail to an external mail id , i am getting below error. Please help
----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <TestId@TestSMTP.com>... User unknown
550 5.1.1 TestId@TestSMTP.com... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
--q5QCa5kc021344.1340714165/aixsrv.localadmin
Content-Type: message/delivery-status
Reporting-MTA: dns; aixsrv.localadmin
Arrival-Date: Tue, 26 Jun 2012 18:06:05 +0530 (IST)
Final-Recipient: RFC822; TestId@TestSMTP.com
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <TestId@TestSMTP.com>... User unknown
Please post what Operating System and version you have and what Shell you use.
Please post the mailx command line you typed (obliterating anything confidential with X's) .
What do you get for nslookup on the name of the mailserver you put into the DS line in sendmail.cf ?
How exactly did you restart sendmail?
What (non-comment) entries are there in /etc/mail/service.switch ?
What (non-comment) entries are there in /etc/mail/sendmail.cw ? Should be "localhost" and the name of the sending server .
while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <TestId@TestSMTP.com>... User unknown
Suggests that in your /etc/mail/sendmail.cf, your relay is wrong: It should be your mail server and so you should not have 127.0.0.1 but the name of the mail server with whom your host is "chatting" with...
Make sure that the SMTP relay server itself knows about you and can do a reverse DNS lookup on your IP address.
The SMTP relay name would normally be a fully qualified host name such that the line reads something like:
DS smtphostname.domain.com
And the entry (or alias) in /etc/hosts should be the fully qualified host name.
I'd only expect localhost and the fully qualified name of the local server unless you are the mail relay server yourself. If the SMTP mail relay server is in the list, that might explain it.
What else? Make sure that nobody has deleted the localhost entry in /etc/hosts and check the system mail log for error messages.
Quick check of the SMTP relay server with telnet to port 25 to make sure that it is listening.