Complete Virtual Mail Server/Linux user vmail

The vmail user
Because valid UNIX user and group id's are needed to store the mailboxes, those should be created as well. Most services get a system ID under 1000. In Gentoo the user ID's start at 1000. An ID of 5000 is chosen for the vmail user. If there is a ton of shell users on the system a different ID can be used as well. For the vmail group the same is done. This will not be a shell account for anybody to log in with.

Storage space
Next to think about is the mail storage. This can be a partition, an nfs share or any ordinary sub-directory. Here is chosen as noted above and created as a 32GiB raid1 partition. Wherever it is chosen to be stored, ownership should be changed appropriately.

Also permissions should be set up properly.

Check the permissions.

Vmail user and Postfix
Postfix needs to know under what permissions to store mail. If required, this also can be looked up on a per user basis from the database. For example, when the maildirs are not located in a central directory, but in each users homedirectory. In this document, the vmail user is the only user to be allowed access.