Posted on 2009-02-11
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 ``'', I would like to use the smart host.
Question by:bryanatm
    LVL 16

    Expert Comment

    I know how to do it via postfix:

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

    This means: when the destination is, send mail through relay host (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/, 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.
    LVL 16

    Accepted Solution

    I found the one for sendmail :
    LVL 1

    Author Comment

    Thanks ai ja nai.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now