Operating System - HP-UX
1751824 Members
5005 Online
108782 Solutions
New Discussion

Re: mail command hangs with just one user

 
SOLVED
Go to solution
Paul Maglinger
Regular Advisor

mail command hangs with just one user

Running HP-UX 11.31 on Itanium rx2660 box.  There is one user when they enter the "mail" command it just hangs until they break out of it.  All other users work fine.  I have tried cleaning the mail (they said it was okay to do so) by

# cat /dev/null > /var/mail/username

 

There is nothing in the mail queue.

 

I have tried Google-Fu but the results I'm getting concern things like the sendmail service not starting on bootup, etc. 

 

I'm not sure how else to explain through search other than it just hangs.

 

Anyone have suggestions on how to troubleshoot or correct this problem?

 

TIA,

 

Paul

4 REPLIES 4
Steven Schweda
Honored Contributor
Solution

Re: mail command hangs with just one user

 
Paul Maglinger
Regular Advisor

Re: mail command hangs with just one user

>> Anyone have suggestions on how to troubleshoot or correct this
>> problem?
 
  > I know nothing, but if your standards are low enough, ...
I'm willing to give it a shot...

>> There is one user when they enter the "mail" command it just hangs until >> they break out of it. > Which 'the "mail"' program is that, and is it the same one for the other (luckier) users? > type mail >which mail >(or whatever works with your (unspecified) shell) /usr/bin/mail

>> All other users work fine. >> I'd expect that to mean a difference between the file(s) and/or environment specific to that user, and those specific to another user. At what have you looked already? Just what I mentioned. Now that you brought it up, I'll see if there's anything in the .profile, etc. that stands out.

>> I have tried cleaning the mail (they said it was okay to do so) by >> # cat /dev/null > /var/mail/username > Less destructive and more informative might have been things like, say: > mv /var/mail/username /var/mail/username_ > cp -p /var/mail/username_ /var/mail/username > Thus not losing any useful info in /var/mail/username, and providing a new file for the "mail" program. (If a new, empty file is desired, that's also easy to do without losing the original.) >> [...] it just hangs [...] > I'd try using "trace", or "truss", or "tusc" (or whatever works on HP-UX) to look at the system calls when a lucky user and an unlucky user try to do the same thing. A program like "top" might tell you if the "mail" program is looping or stuck. > Perhaps some other program has the user's /var/mail/xxx file locked somehow. "fuser" and/or "lsof" might reveal that. (I haven't used a UNIX system for mail for decades, so I know nothing, but perhaps another instance (process) of "mail" run by the unlucky user could do this.) Both good suggestions. I'll take a look.
>> There is nothing in the mail queue. > I wouldn't expect that (outgoing mail?) to matter.
Just sayin'...

Thanks Steve
Paul Maglinger
Regular Advisor

Re: mail command hangs with just one user

Thanks Steve. Found the issue in the .profile. The user had a line:
MAIL=/usr/spool/mail/$USER
The mail directory didn't exist. Everything is working fine now.
Dennis Handly
Acclaimed Contributor

Re: mail command hangs with just one user

>There is one user when they enter the "mail" command

 

On HP-UX, nobody should use the obsolete mail command.  They instead should be using mailx(1).