On Sun, Jul 03, 2011 at 12:27:19AM +0200, Jeroen wrote: > I'm running two postfix mail servers which at the moment only relay > and filter for several tld's. > > What I would like to accomplish is keep relaying, but have exception > e-mail addresses that need to be forwarded other accounts. > > For example: > @bar.com > relay to some host
BTW, please do not use real domain names as examples. We have example.com and example in all gTLDs as well as many other TLDs, which has been set aside for examples. Or better yet, when seeking help on mail routing issues, use the real names! Wildcard forwarding is a very bad idea. You WILL be abused by spammers into becoming a backscatter source. > f...@bar.com > forward to foo...@gmail.com Same-envelope forwarding to external sites is also quite likely to become a source of problems for you. When you receive and forward spam to this address, gmail content filtering will identify it as such, and will regard you as the spammer. > From reading the documentation, I think I need to implement > virtual_maps, Did you note in the documentation that virtual_maps was deprecated with Postfix 2.0? > but the same documentation also notes that virtual_maps > and relay_domains should not be used together. I do not know what you read. You can indeed use virtual_alias_maps with any and all address classes. See: http://www.postfix.org/ADDRESS_CLASS_README.html http://www.postfix.org/postconf.5.html#virtual_alias_maps http://www.postfix.org/VIRTUAL_README.html (might also help) > The configuration is now based on a relay_domains hash file, > relay_recipients hash file and a transport hash file. Good. Sounds right to me. No catchall in relay_recipient_maps means that my backscatter warning above is moot in your case. > What's the best way to accomplish my needs? Can someone provide > me an example? virtual_alias_maps = hash:/path/to/your/virtual_alias_maps /path/to/your/virtual_alias_maps contains: f...@bar.com foo...@gmail.com Note the problem as mentioned above, but otherwise, it works. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header