Sendmail

midguy
midguy used Ask the Experts™
on
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.
thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
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  server.company.domain.
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 sendmail.cf 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/main-v7sun.mc file

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

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

When you are thru, use
/usr/ccs/bin/make main-v7XXXXX.mc and you get a
main-v7XXXXX.cf file.
 
Copy this file to /etc/mail/sendmail.cf 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:
mountall

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


HTH
 

Author

Commented:
Besky,

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

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