[Solved] mailx : unknown user issue | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

[Solved] mailx : unknown user issue

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-26-2012
chpsam chpsam is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 27 August 2013, 6:10 AM EDT
Posts: 19
Thanks: 8
Thanked 2 Times in 1 Post
Bug [Solved] mailx : unknown user issue

Hi all,

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


Code:
   ----- 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


Last edited by methyl; 06-26-2012 at 08:50 AM.. Reason: please use code tags
Sponsored Links
    #2  
Old 06-26-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
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 .
Sponsored Links
    #3  
Old 06-26-2012
chpsam chpsam is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 27 August 2013, 6:10 AM EDT
Posts: 19
Thanks: 8
Thanked 2 Times in 1 Post
OS : HP-UX B.11.31 U ia64 2819354210 unlimited-user license

Shell : /sbin/sh

mailx command used:

sh ServerStatus.sh| mailx -s "Server Status mail - DEV_SERVER" Dev_Admin@XXXXXXX.com

nslookup output:

looking up FILES
Name: smtphostname
Address: xx.xxx.xx.43

restart:
I restarted using below commands.

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

there is no file "service.switch" in /etc/mail

there are many server names which are non-commented in /etc/mail/sendmail.cw

Please let me know if any other info is needed. Please guide me.

Last edited by chpsam; 06-27-2012 at 03:57 AM..
    #4  
Old 06-27-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 1 September 2014, 12:58 PM EDT
Location: Switzerland - GE
Posts: 5,648
Thanks: 152
Thanked 391 Times in 370 Posts
I think its working correctly, and that it is the email address you sent that is giving you trouble, have you tried with a known valid address?
Sponsored Links
    #5  
Old 06-27-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 1 September 2014, 12:58 PM EDT
Location: Switzerland - GE
Posts: 5,648
Thanks: 152
Thanked 391 Times in 370 Posts

Code:
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...
The Following User Says Thank You to vbe For This Useful Post:
chpsam (06-28-2012)
Sponsored Links
    #6  
Old 06-27-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
Make sure that the SMTP relay server itself knows about you and can do a reverse DNS lookup on your IP address.


Quote:
nslookup output:

looking up FILES
Name: smtphostname
Address: xx.xxx.xx.43
The SMTP relay name would normally be a fully qualified host name such that the line reads something like:

Code:
DS smtphostname.domain.com

And the entry (or alias) in /etc/hosts should be the fully qualified host name.


Quote:
there are many server names which are non-commented in /etc/mail/sendmail.cw
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.
The Following User Says Thank You to methyl For This Useful Post:
chpsam (06-28-2012)
Sponsored Links
    #7  
Old 06-28-2012
chpsam chpsam is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 27 August 2013, 6:10 AM EDT
Posts: 19
Thanks: 8
Thanked 2 Times in 1 Post
Hi vbe, methyl,

Thanks very much for your inputs. Issue is resolved. I replaced smtphost name with full qualified name , now it is delivering mail. Thanks again.
The Following 2 Users Say Thank You to chpsam For This Useful Post:
methyl (06-28-2012), vbe (06-28-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AIX FTP issue Priya Amaresh AIX 3 06-21-2012 02:32 PM
mailx issue - shellwell Shell Programming and Scripting 3 07-23-2009 05:22 AM
Ho do I masquerade the "user@user.local" address in mail/mailx? gczychi OS X (Apple) 0 04-18-2009 02:31 PM
check pass; user unknown mcraul UNIX for Advanced & Expert Users 1 07-21-2008 06:07 AM
mailx Issue with -r flag superdelic UNIX for Dummies Questions & Answers 1 01-22-2008 10:06 AM



All times are GMT -4. The time now is 09:53 PM.