

$ sudo nano /catchall/ # catch all addressĬreate the virtual_alias file and optionally set a redirect:

Virtual_gid_maps = static:1001 # group ID for user vmailĬreate the file virtual_domains under /etc/postfix: Virtual_uid_maps = static:1001 # user ID for user vmail Virtual_alias_maps = hash:/etc/postfix/virtual_alias Virtual_mailbox_maps = hash:/etc/postfix/virtual_maps

Edit /etc/postfix/main.cf and add the following lines: $ sudo mkdir -p /home/vmail//aliceĪllow only the user vmail to access these files: Vmail:x:1001:1001::/home/vmail:/usr/bin/nologinĬreate a base directory layout for domains and users: I assume that you have completed your basic Postfix setup and that it is working properly.įollow these steps to add e-mail account: You will need access to a root account or an account with sudo privileges. We will create a virtual user setup so that we do not need to create user accounts for each e-mail user. Postfix will check for user accounts and deliver e-mails to respective users. The easiest way to add a new e-mail account to Postfix is to add a new user account on your server. In this recipe, we will learn how to add e-mail accounts to Postfix.
