View Single Post
  #7  
Old 8th June 2010, 07:09
Happy Happy is offline
Member
 
Join Date: Jun 2007
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok followed the directions below and get the following error

postmap /etc/postfix/virtusertable
postmap: fatal: open /etc/postfix/virtusertable: No such file or directory

I also notice that the user I created does not have a home drive nor a maildir folder. However the user ID was created

How do I create the following files

etc/postfix/virtusertable'
/etc/postfix/local-host-names

First you have to tell Postfix to deliver emails to a user's Maildir:

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:

useradd -d /home/sample_user -g users sample_user
passwd sample_userThen run

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.:


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



info@yourdomain.com sample_user
thomas@example.com sample_user
webmaster@yourdomain.com sample_userEmails 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:

postmap /etc/postfix/virtusertableNow restart Postfix:

/etc/init.d/postfix restart

Last edited by Happy; 8th June 2010 at 18:54.
Reply With Quote