• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

How do I Relay between Domains with sendmail in Solaris

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.

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

Then restart sendmail.

mailertable is the right tool to use:

1. Edit the etc/mail/mailertable file to make it looks like:

somedomain.com          smtp:othermachine.somedomain.com
or (forward to a machine IP)
somebodyelse.net          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:
in /etc/mail/sendmail.cf set:


if you use m4 to generate the files, make changes in the corresponding files (sendmail.m4 usually) and generate the others
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

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.
Waterskier28offAuthor Commented:
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.
do you use default Sun installation for sendmail?
Not that Sun has it's own idea how sendmail works ...

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now