Michael L Torrie wrote:
On Mon, 2007-06-25 at 13:17 -0600, Kirk Cerny wrote:
I have not rried it but, you could use a regex in the virtual file to
match all after all the other matches, and forward them to there
desired location.

# virtual file
/^(.*)@(.*)$/    [EMAIL PROTECTED]

Nope that won't work.  I need to forward mail to a particular MX, not an
e-mail address.  in other words [EMAIL PROTECTED] gets forwarded to SERVER
B, which takes care of [EMAIL PROTECTED]  The e-mail address it is going to
is still [EMAIL PROTECTED]

A common use case for this type of things is a SMTP server that accepts
mail, then, based on the address (and/or the domain) relays the mail on
to the server that handles those addresses.  For example, a corporation
may have a corporate e-mail server that sends mail off to regional
servers based on some criteria that could even be something to do with
the username part.

In my case I'm using Google Apps for domains, but I want my server to
accept all the mail first, processing the accounts that it has, and then
sending whatever it doesn't want to deal with off to google's MX where
the rest of my users are managed.

I'll keep researching.

Michael




/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

If you are just wanting to relay mail to specific address, you can do it by just using the email aliases file (most likely /etc/aliases). I currently use postfix in a manner similar to this. I manage a postfix server which has a lot of local mailboxes but also relays mail for some accounts on to a hosted exchange system. I am guessing that you have individual account on the google side in which case you could simply do something like

joe: [EMAIL PROTECTED]


in /etc/aliases. This will forward the mail that is received for joe on to the gmail account for joe and, depending on the configuration on the google side, the to address would not be changed. I'm not quite sure if this is what you are looking for. Good luck either way.

Mike Lovell

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to