Postfix Email Relay by Domain

I have a Mailscanner box I am using as a frontend to Exchange.  One of the domains I host uses MX-Logic to scan inbound and also as a smart-host.  I realize that in Exchange 2010 I can create a transport rule that would forward outbound mail from those users directly to MX Logic for delivery.  I do like to use the Mailscanner to troubleshoot mailflow as its interface is better than Exchange.

Is there a code I can put in the postfix config like "relayhost = mail.domain.com" that would seperate by outgoing domains?
redairforceAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bevhostCommented:
If you want to direct mail to a certain smarthost, based on the senders email address, then read this

http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps

Normally transport maps work on the destination address, but as of postfix 2.7, you can now do it based on sender address instead.

so in a hash file it would be

domain1.com   smtp:[relay.host.com]
domain2.com   smtp:mx_of.relay.host

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Active_TechCommented:
Create an empty file to contain all of the domains and smart hosts
vi /etc/postfix/transport

Open in new window


Insert a line for ech domain that you wish to redirect. Once complete run the below command
postmap /etc/postfix/transport

Open in new window


Now open etc/postfix/main.cf and enter the line
transport_maps = hash:/etc/postfix/transport

Open in new window


Save the file and run
postfix reload

Open in new window

Alan HardistyCo-OwnerCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AntiSpam

From novice to tech pro — start learning today.