Posts Tagged ‘virtual_alias_maps’

Postfix Virtual Domain Hosting Howto


Hi again

regarding one of my previous post which was about installing the postfix with spam filtering, i decided to write about the another capability of the postfix. the ability of serving to multiple domain. it could be configured with my_destination option but i highly recommended you to  enable it as virtual domain hosting.

the option you should add to your file (main configuration file of postfix commonly placed in /etc/postfix) are :

virtual_alias_domains = ,,
virtual_alias_maps = hash:/etc/postfix/virtual

after all you should create a new file which name /etc/postfix/virtual and add the the following option in it.

$yourdomainname       virtual

postmaster@$yourdomainname  user1

info@$yourdomainname  user2

@$yourdomainname user1

the second line indicates that the the mail postmaster@$yourdomainname should be forwarded to user1 of your linux system.

and the last says all the other email address with your domain suffix will be forwarded to user1.

then you should create the db file for your virtual file.

postmap /etc/postfix/virtual

then you should link it to your postfile chroot address.

ln -s /etc/postfix/virtual.db /var/spool/postfix/etc/

then reload your postfix service :)

reference :

thats it.


     Copyrighted Mehdi Behamin , All Rights Reserved
Blog has been visited 204738 times