midguy used Ask the Experts™
Please assist me how to setup a sendmail for my company in detailed steps. I got a task to setup mail gateway, mail server, mail clinets using nis, please explain how to incorporate with DNS. I want detailed steps.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Maybe you should bump up the points a bit, noone else is going to give you a sendmailcourse for 20 pts (advice for next time)

OK, short sendmail course.

To make local mail works it is enough to put the alias
ipaddress       hostname hostname.subdomain.domain

in the /etc/inet/hosts file.
An easier way is to make one system the mailserver
( the machine having all /var/mail/"mailboxes" and nfsmount
these on the clients.
The clients will automaticlly send mail thru this machine, no local config is neccessary.
Put this line in /etc/dfs/dfstab
share -o anon=0 /var/mail
 and run
/etc/init.d/nfs.server start

But to reach the net you need a "mailrelay" system, pointed out in your DNS with an MX-record.
Put the line:
company.domain.   IN   MX  10
Update the serialnumber in the SOA record and
restart in.named  with
pkill -HUP in.named

Then on this system you ned to configure some things for a new file.
The good news is that you dont have to edit this file, in Sol8 it is done thru config files below /usr/lib/mail

You should make a new domainfile but a shortcut is to edit
the /usr/lib/mail/cf/ file

Add the lines of
feature relay-alldomains,
masquerade,  ( when you want user@company.domain as From )

It is all explained in the /usr/lib/mail/README file.

When you are thru, use
/usr/ccs/bin/make and you get a file.
Copy this file to /etc/mail/ and restart sendmail with /etc/init.d/sendmail stop/start

In DNS you need an MX record that points out your mailrelay server to the outside world.

On the clients:

In /etc/vfstab put the line
servername:/var/mail  -  /var/mail  nfs - yes  actimeo=0
Run teh cmd:

1. Create a file called /etc/resolv.conf with:

search    yourcompany.doamin
nameserver ipaddress of dnsserver

2. Copy /etc/nsswitch.nis to /etc/nsswitch.conf

Change the hosts line to:

hosts: nis files dns

3. Edit /etc/hosts

Put the ipaddress and name of nameserver exactly as in the /etc/resolve.conf file

Hope I remebered everything now, otherwise come back




I really appreciate your help. I don't know how many point I need to give a question. In future I will put more points. I will get back to you, if I need any thing more on this.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial