On Feb 8, 2009, at 4:23 PM, Wietse Venema wrote:

Tony Demark:

On Feb 8, 2009, at 2:31 PM, Wietse Venema wrote:

Tony Demark:
I would like to move some of my virtual domains to have their email
hosted via a "Google for Domains" account. While there are only a
handful of accounts, most of the accounts have many aliases and have
used '-' as a recipient delimiter for years. As such, the actual
number of addresses is probably in the thousands. Since Google uses
'+' as the recipient delimiter, there is no easy way to just switch
the domains over. I would like to use my Postfix server to filter /
rewrite incoming addresses and then relay them on to Google, with my
server being the MX server for the domain and using a smtp
"transport"
entry to direct the messages to the right place.

http://www.postfix.org/virtual.5.html
http://www.postfix.org/pcre_table.5.html

I tried PCREs at one point, and got close, but I kept hitting a wall
that original left hand side of the address would get relayed to the
new server, as opposed to the one that was specified in the virtual
table.  For example:

virtural_regex:
/^(.*?)-(.*)@example.com$/    $...@example.com

If the original server gets an email addressed to 'me-
foo...@example.com', I need the email to be relayed to
'm...@example.com', not 'me-foo...@example.com'.

/^(.+)(-.+)?...@example\.com$/    $...@example.com


OK ... I think I got this figured out. It ended up that the searches I was referencing for configuration were from 2002 ... things have changed somewhat since then. Combine that with a typo in a file name and things really start not adding up.

I started fresh with an unused domain, used only the official docs, and got it working. Sometimes you end up so far down the wrong path, it's hard to comprehend just how far you have to backtrack to right yourself, even if you have access to the best and brightest!

Thanks for the help.


Reply via email to