Mail Server - Vmail User and Mailboxes
Now that we have a good overview of what we'll be doing, we can move onto an important aspect of creating a mail server: configuring where the mail will be physically located on the Cloud Server.
The easiest way is to create a 'vmail' user and assign specific IDs to that user.
vmail user and group
Using the name 'vmail' is a common way of identifying the system user where the mail is physically located.
Note that when we use MySQl for our multiple domains and users, it does not hold the mail itself, just the details of all our users and domains.
The user is created like any other but we will specifically define the vmail group and user IDs and ensure the user cannot login (the vmail user is not one that will have login access to the Cloud Server - it is simply somewhere central to hold the emails.).
Let's start with the vmail group:
sudo groupadd -g 5000 vmail
That creates the group and assigns the GID (group ID) of 5000
Now we can move into the vmail user:
sudo useradd -s /usr/sbin/nologin -g vmail -u 5000 -d /home/vmail -m vmail
This command creates the 'vmail' user, ensures they can't login (it is not a normal account), adds them to the 'vmail' group and creates the home directory.
Setting the 'vmail' user and group with specific IDs is an essential part of the mail server setup. Missing this section will mean your mail server will not work.
The next article in the series looks at installing Postfix and MySQL.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER