• 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.


0
Waterskier28off
Asked:
Waterskier28off
2 Solutions
 
wesly_chenCommented:
> Do you know what files need to be changed to get all mail routed out to a different machine?
/etc/mail/mailertable
--
domain.com    smtp:[x.x.x.x]
--

Then restart sendmail.

Wesly
0
 
yuzhCommented:
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:123.10.5.1

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:
    http://freebsd.peon.net/tutorials/16/
    http://www.sendmail.org/m4/mailertables.html
0
 
ahoffmannCommented:
in /etc/mail/sendmail.cf set:

DSyour.relay.host

if you use m4 to generate the files, make changes in the corresponding files (sendmail.m4 usually) and generate the others
0
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.

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

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