On Linux, what is the "mail" user account for?

6,888

Rule of thumb when when dealing with system administrator user accounts (those that UIDs range from 1-99) should never be touched (unless you know 100% what you are doing). These user accounts tend to be needed for important system functions.

http://www.linfo.org/uid.html

UIDs 1 through 99 are traditionally reserved for special system users (sometimes called pseudo-users), such as wheel, daemon, lp, operator, news, mail, etc. These users are administrators who do not need total root powers, but who perform some administrative tasks and thus need more privileges than those given to ordinary users.

Sendmail for example, is one such application that uses the mail user if the default options are left intact. The DefaultUser option in Redhat 7 defines the userID as 8 and the groupID as 12. These values match with the mail user in your /etc/passwd file:

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
Share:
6,888

Related videos on Youtube

Rui F Ribeiro
Author by

Rui F Ribeiro

Updated on September 18, 2022

Comments

  • Rui F Ribeiro
    Rui F Ribeiro almost 2 years

    There's an account mail and a group by the same name on my system, what's its purpose ?

    It owns the /var/spool/mail directory (empty currently). I plan to use that directory, as well as that user to own the files of my "virtual" (ie, not tied to any real user account on the system) email accounts (instead of creating yet another user), is there anything wrong with that ?

    I've searched already but sadly, Google only brings up results either about the mail command or how-tos about how to create mail user accounts (install an MTA, etc)...

    • SPRBRN
      SPRBRN over 9 years
      Do you have sendmail or postfix installed? I guess the mail user is a standard user on Linux systems. I see it on my local Mint desktop and on a Centos machine.
    • Admin
      Admin over 9 years
      Postfix is installed but runs under its own "postfix" (as well as a bunch of other users like "postdrop").
    • Admin
      Admin over 9 years
      I'm mainly asking whether some program that I'm not aware of can get this "mail" user's privileges and access the mail I'm going to store in /var/spool/mail.
    • SPRBRN
      SPRBRN over 9 years
      If you don't know what it's used for, and if it's there, don't mess with it. Create your own folder and use that!