Postfix - Forwarding Virtual Mailboxes

Setting up Postfix to handle mail for a virtual domain and forward it to external mailboxes is pretty easy. Here's an example for a few domains:

/etc/postfix/main.cf

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

/etc/postfix/mydomains

     foo.com          OK
     foo1.com         OK
     foo2.com         OK

/etc/postfix/virtual

     frank@foo.com           frank@gmail.com
     jane@foo.com            jane@earthlink.net
     jim@foo1.com            jimmy@yahoo.com
     peter@foo2.com          pete@hotmail.com

Remember, each time you edit /etc/postfix/virtual, do the following:

postmap /etc/postfix/virtual /etc/postfix/mydomains
postfix reload

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2006/12/26/postfix-virtual-mailboxes-forwarding-externally/ .
© Major Hayden 2010.

Trackbacks/Pingbacks

  1. Postfix: Weiterleitung virtueller Postfächer | Sebastian Bauer (IT-Blog)

RSS feed for comments on this post , TrackBack URI

Leave a Reply