I've seen a few answers to this on the web, but nothing definitive nor any good examples.

I relay all my mail out through Postfix, currently everything sent to my ISP's mail server.

However, there are a few users with gmail accounts or gmail-hosted accounts; I'd like to route their outgoing mail through Google's servers (since it will then appear in their Gmail sent folder). All email NOT from one of these senders should go out through the default relayhost.

I believe I need to use the "sender_dependent_default_transport_maps" configuration within Postfix, but can't find a good example on what this setup looks like. Can anyone point me at a specific setup?


Are you sure you're after sender_dependent_default_transport_maps, and not sender_dependent_relayhost_maps? In either case, I'm pretty sure the format is like any of the other _maps tables:

theirmail@senderdomain.com      smtp.gmail.com
@someothersenderdmn.com         smtp.gmail.com

The first being an exact sender match, the second being a domain level match.

That being said, I'm pretty sure Google isn't going to allow you to relay through them without authenticating, and as you're handling relaying for multiple users, I'm sure you don't want to setup that kind of relaying setup, nor will they likely want to disclose their passwords to you.

  • No, I'm not sure, I had a hard time figuring out which items to use and which were not deprecated. I'll check this out. Thanks. – Joe Jun 1 '10 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.