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

Printed from: http://rackerhacker.com/2006/12/26/postfix-virtual-mailboxes-forwarding-externally/ .
© Major Hayden 2012.

1 Comment   »

Trackbacks/Pingbacks

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

RSS feed for comments on this post

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this