Operating System - HP-UX
1819803 Members
2957 Online
109607 Solutions
New Discussion юеВ

Owner of files in /etc/mail

 
Larry Hart
New Member

Owner of files in /etc/mail

HP-UX 11.0
Question: when we send mail to root, oracle or adm the file in /etc/mail that is created is owned by the user that sent the mail.

If root send the mail to oracle the owner is daemon and the group is sys. -rw-rw--- daemon sys /etc/mail/oracle

We have change the own and group of the files in /etc/mail. Example -rw-rw--- oracle dba /etc/mail/oracle. But if oracle delete all her mail that file will go away until someone sends mail to oracle and that file is re-created with the wrong owner and group

Thank you
Aloha
3 REPLIES 3
Steven Sim Kok Leong
Honored Contributor

Re: Owner of files in /etc/mail

Hi,

In the first place, /etc/mail contains your mail configuration files such as sendmail.cf. Your mails are kept at /var/mail. Thus, your oracle mail should reside as /var/mail/oracle.

It should be a zero-byte file even if the oracle administrator decides to delete all his mails from his mailbox be it via elm or pine, thus retaining the correct ownership.

Hope this helps. Regards.

Steven Sim Kok Leong
Michael Tully
Honored Contributor

Re: Owner of files in /etc/mail

Hi,

Mail be default is kept in /var/mail. User user mailbox should be owned by the user and the group mail.

-rw-rw---- 1 oracle mail 246110 Apr 21 05:07 oracle

Even once the mail is deleted ny the user say using 'elm' a zero byte file remains.

HTH
Michael
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor

Re: Owner of files in /etc/mail

You NEVER want your email to be stored in /etc/mail! Unless you set a special environment variable, the location for email messages is /var/mail and the owner MUST be: recipient and mail with 660 permissions. If the mailbox does not have these permissions then mail cannot be delivered. For your example, the oracle mailbox would be owner=oracle, group=mail and 660 permissions.


Bill Hassell, sysadmin