View Single Post
  #8  
Old 29th August 2007, 23:36
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating email accounts

Quote:
Originally Posted by falko
First you have to tell Postfix to deliver emails to a user's Maildir:

Code:
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart
Then you have to create a system user and a password:

Code:
useradd -d /home/sample_user -g users sample_user
passwd sample_user
Then run

Code:
postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
postconf -e 'mydestination = /etc/postfix/local-host-names'
/etc/postfix/local-host-names should contain all domains that you want to accept emails for, e.g.:

Code:
localhost
your.server.name
localhost.your.server.name
example.com
yourdomain.com
/etc/postfix/virtusertable looks like this:

Code:
info@yourdomain.com  sample_user
thomas@example.com  sample_user
webmaster@yourdomain.com  sample_user
Emails for info@yourdomain.com, thomas@example.com and webmaster@yourdomain.com will now arrive in the mailbox of sample_user.

Everytime you change /etc/postfix/virtusertable you have to run the following command:

Code:
postmap /etc/postfix/virtusertable
Now restart Postfix:

Code:
/etc/init.d/postfix restart
and you're done!
Ok I orginally created the users mailboxes in webmin

and then created them in
/etc/postfix/virtusertable
when I ran /etc/init.d/postfix restart
I got a error/warning saying duplicate -
however the users remained in
/etc/postfix/virtusertable

Should I expect any issue
If not then I will begin testing as I am done except for doing some Spam catching/filtering

Happy
Reply With Quote