Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

/var/mail/<user id >related mail box

SOLVED
Go to solution
sarma
Advisor

/var/mail/<user id >related mail box

HI
When the user was created the mail box under /var/mail was not created ? HOw does this get created ? If this does not exist, what happens to the mail being sent to that user
15 REPLIES
Steven E. Protter
Exalted Contributor
Solution

Re: /var/mail/<user id >related mail box

It gets created when there is mail for the user.

Send an email to the user using elm or something and it will be created.

Alternatively the user may cause its creation by openning a mail client such as elm or mail.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sarma
Advisor

Re: /var/mail/<user id >related mail box

can your clarify me couple of the related issues.

1. When we add user it does not get created automatically, Is that right ?

The situation I saw was as follows :
ther was no /var/mail/user1
when I tried to send the mail to that user, and did mailx, the system responded that there was no mail.

I used elm and it prompted me if it can create an Mail account and I responded yes.
At that time, I donot remember it created that mail box under /var/mail
But when the sendmail daemon was bounced, I saw that the mail box got created under the /var/mail/user1

The reason it might have created me somr problems was because the Oracle Apps was using Javamail via the user1 account to send mails to the other users.

Any thoughts / comments ?
thanks
Ivan Ferreira
Honored Contributor

Re: /var/mail/<user id >related mail box

The mailbox file will be created when you send the first message to the user. Send a welcome message to the user.

You should check /var/log/maillog when you send a message to the user. You should get Stat=sent.


Also, /var/mail is a hard link to /var/spool/mail, something that i did not know until today.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
sarma
Advisor

Re: /var/mail/<user id >related mail box

I did not see any /var/log dir on my system
Steven E. Protter
Exalted Contributor

Re: /var/mail/<user id >related mail box

No /var/log ???

Thats not good:

df /var

See if its even mounted.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sarma
Advisor

Re: /var/mail/<user id >related mail box

Yes, it is mounted. fyi I am on HP-UX B.11.11 U 9000/800. I am not sure if it makes any difference

df /var
/var (/dev/vg00/lvol8 ): 16533888 blocks 260367 i-nodes

Ivan Ferreira
Honored Contributor

Re: /var/mail/<user id >related mail box

Most Linux distributions (if not all) have /var/log, as said above, verify that is mounted.

Other Unix implementations have /var/adm. Verify the configuration of /etc/syslog.conf to know where the log files are located.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: /var/mail/<user id >related mail box

I don't remember whel, but it seems that in HP-UX all log files are located in a file called syslog.log.

It should be

/var/adm/syslog/syslog.log

Of

/var/adm/syslog.log

I can't remember.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
sarma
Advisor

Re: /var/mail/<user id >related mail box

the equivalent is
/var/adm/messages
sarma
Advisor

Re: /var/mail/<user id >related mail box

I did not realize that I posted under linux. but most of the underlying processes must be similar.
Steven E. Protter
Exalted Contributor

Re: /var/mail/<user id >related mail box

Well there, now the confusion is explained.

You posted to Linux Sysadmin.

bdf /var

As noted /var/adm is the HP-UX equivalent.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sarma
Advisor

Re: /var/mail/<user id >related mail box

as the basics being equal, the situation I am in as follows :

the Oracle Apps uses the java mailer in conjunction with smtp
when the apps sends an outbound mail, it makes use of the smtp to send to a mailbox on the mailserver. The java threads using an IMAP processes them and sends those mails to respective end uesrs.

When we are sending these emails through the apps, they were getting nowhere eventhoug I can send the mail from cmd line on the box. When the sendmail was bounced magically, the Oracle Apps were sending the mails fine

I reviewd the mail.log under /var/adm, I noticed the messages like

Aug 24 10:53:05 orbitdev sendmail[22756]: KAA22756: ruleset=check_mail, arg1=, relay=applmgr@orbitdev.server.kn
x [10.1.15.7], reject=501 Sender domain must exist

Also, I saw after rebooting the box, it was looking for nis and we are not using nis.

Now the questions are :
1. if we are not using nis, how do we debug situation that we gotten in ? Is there a way to track these issues ?

2. Why does the "Sender domain must exist" gone after the senmail was bounced ? Is there a correlation there ?
thanks
Ivan Ferreira
Honored Contributor

Re: /var/mail/<user id >related mail box

See:

http://www.sendmail.org/~ca/email/chk-89f.html

Section:

Check Sender Information
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
sarma
Advisor

Re: /var/mail/<user id >related mail box

Thanks for that doc, I am looking at that. Meanwhile, when I looked at the mail.log, I noticed the following error :

NIS map mail.aliases specified, but NIS not running

This I suspect is causing email outages when we reboot the server ? HOw do we get arond it ?
Fred Martin_1
Valued Contributor

Re: /var/mail/<user id >related mail box

We had a similar thing happen. Some users were popping in for mail and getting errors since they had not received their first email yet, and I think Pine gives a similar error.

I use task customization in SAM, and run a script every time a user is created. I did this for other reasons (putting certain files in the user's home directory, etc) but it also pre-creates the mailbox for the user:

# set up an empty mail inbox
touch /var/mail/$2
chown $2:mail /var/mail/$2
chmod 660 /var/mail/$2

SAM provides the user name as $2, so this was a nice way to pre-create an empty mail file with the correct permissions, just as the user is created.
fmartin@applicatorssales.com