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
#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
#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’
#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
example.com
linuxpcfix.com
/etc/postfix/virtusertable looks like this:
info@yourdomain.com info
admin@example.com admin
administrator@yourdomain.com administrator
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!
