Home » Postfix » How to create mail account/user in postfix

How to create mail account/user in postfix

This tutorial will help you to create mail user/account at postfix mail server

1. First of all you have to build a system user and a password:

#useradd info
#passwd info

Then run
2. Then you have to tell Postfix to transport emails to a user’s Maildir:

#postconf -e ‘home_mailbox = Maildir/’
#postconf -e ‘mailbox_command =’
#service postfix restart

3. Then execute below command.

#postconf -e ‘virtual_maps = hash:/etc/postfix/virtualusertable’
#postconf -e ‘mydestination = /etc/postfix/local-domain-names’

/etc/postfix/local-domain-names should enclose all domains that you want to accept emails such as;

localhost
example.com
linuxpcfix.com

/etc/postfix/virtusertable looks like this:

info@yourdomain.com info
admin@example.com admin
administrator@yourdomain.com administrator

Emails for info@linuxpcfix.com, admin@example.com and administrator@yourdomain.com will now arrive in the mailbox of user.

Note : Every time you change /etc/postfix/virtualusertable you have to run the below command:

#postmap /etc/postfix/virtualusertable

Now restart Postfix:

#Service postfix restart

Enjoy!

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud