We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now



bryanatm asked
Medium Priority
Last Modified: 2013-12-16

I would like to use sendmail smart host only for sending mail to a certain domain.  For example, I want all mail to be default and send directly.  However, for any mail going to ``domain.com'', I would like to use the smart host.
Watch Question

I know how to do it via postfix:

1. Edit /etc/postfix/transport. Example
domain.net smtp:[smtp.domain.net]

This means: when the destination is @domain.net, send mail through relay host smtp.domain.net. (The host name is in brackets to disable MX lookup)

2. Run 'postmap /etc/postfix/transport' to update the db (mine is hash)

3. In /etc/postfix/main.cf, enable transport_maps
transport_maps = hash:/etc/postfix/transport

In this case the map is a hash file, adjust as necessary. For more detail see 'man transport' for the syntax of the transport mappings.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks ai ja nai.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.