Operating System - HP-UX
1751713 Members
4977 Online
108781 Solutions
New Discussion юеВ

Re: /var/mail/mbox issues

 
SOLVED
Go to solution
KPS
Super Advisor

/var/mail/mbox issues

Hi,

We have a user complaining that they're not getting mail in /var/mail/ from a script that sends them statuses on nightly batch jobs.

If I cd /var/mail, I don't see a mailbox there. Should the mail messages be creating a file in this /var/mail area? If so, could I be seeing a permssions issue with /var/mail possibly?

Any help, greatly appreciated!

KPS
7 REPLIES 7
Court Campbell
Honored Contributor

Re: /var/mail/mbox issues

there will only be a file with the users name if they have mail. if they don't have mail then there will not be a file.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: /var/mail/mbox issues

can you paste the script?
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Keith Johnson
Valued Contributor
Solution

Re: /var/mail/mbox issues

Check the mail log (/var/adm/syslog/mail.log). If the problemn is mail-realated it sould give you some insight. I'd also suggest looking at any output from the batch jobs in question.
No matter where you go...there you are.
KPS
Super Advisor

Re: /var/mail/mbox issues

Okay, when looking at the script that generates the email, it looks like it's sending the mail to a distribution list that is setup in an .env file. That being said, I want to change this to be sent to the a user local on the system instead of email.

How do I go about sending it to the user's local Unix System mailbox in /var/mail?
Peter Nikitka
Honored Contributor

Re: /var/mail/mbox issues

Hi,

if the mail gets forwarded to another address, there won't be a local file for it:
Check for ~usernam/.forward

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Keith Johnson
Valued Contributor

Re: /var/mail/mbox issues

>>How do I go about sending it to the user's local Unix System mailbox in /var/mail?

Simply put the user's local login in the line that sends the mail. You'll also want to make sure that there isn't a ".forward" file in the user's home directory and that the user's login isn't aliased in the /etc/mail/aliases file.
No matter where you go...there you are.
KPS
Super Advisor

Re: /var/mail/mbox issues

Thanks everyone for your help.