How do I Relay between Domains with sendmail in Solaris

Posted on 2004-11-17
Last Modified: 2013-12-27
I need all of the mail routed to machine x on campus. Machine x then checks that it is not spam and sends it out. I have tried defining machine x in various sendmail files but I can not get it to work. Do you know what files need to be changed to get all mail routed out to a different machine?

I have added machine x in the /etc/mail/relay-domains file. What else do I need to change? Thanks for any help you can give me.

Question by:Waterskier28off
    LVL 38

    Expert Comment

    > Do you know what files need to be changed to get all mail routed out to a different machine?
    --    smtp:[x.x.x.x]

    Then restart sendmail.

    LVL 38

    Accepted Solution

    mailertable is the right tool to use:

    1. Edit the etc/mail/mailertable file to make it looks like:
    or (forward to a machine IP)          smtp:

    2. run  makemap to rebuild the database: (assume that you are in /etc/mail, otherwise
        use full path, eg: /etc/mail/mailertable)

         makemap hash mailertable < mailertable

    see the following docs to learn more details:
    LVL 51

    Assisted Solution

    in /etc/mail/ set:

    if you use m4 to generate the files, make changes in the corresponding files (sendmail.m4 usually) and generate the others
    LVL 38

    Expert Comment

    ahoffmann make a good point, defined you mail gateway as the Smart Host of the other
    mail server, and scan the out going email at your mail gateway  (machine x ).

    remember to restart sendmail after you change the DS record.

    Author Comment

    I'm still working with this and I appreciate all the suggestions.

    When I figure out what the missing link is, I'll accept the solution that got me there.
    LVL 51

    Expert Comment

    do you use default Sun installation for sendmail?
    Not that Sun has it's own idea how sendmail works ...

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    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…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now