Solved

Stop Sendmail from relaying mail under SunOS

Posted on 1998-11-27
2
383 Views
Last Modified: 2013-12-16
Hi there,

I am pretty much a Unix dummy. :)

Still I "inherited" the management of our workstations. We have Sendmail 8.8.8 under SunOS 5.6 installed.

Now how can I make sure, the smtp daemons on our workstations do NOT relay any mail FROM outside TO someone outside?. Although smtp configuration is known to be a pain in the $&%, I hope there is a relatively simple way to do it.

And is there a way to check whether I was successuful?

Greetings,

          os
0
Comment
Question by:os012897
2 Comments
 
LVL 3

Author Comment

by:os012897
ID: 1812425
Edited text of question
0
 
LVL 4

Accepted Solution

by:
davidmwilliams earned 100 total points
ID: 1812426
 What you really should do is install the _latest_ sendmail, and generate a new .cf file, which by default has a 'no promiscuous mode' that prevents mail being relayed from outside domains -- i.e. precisely what you want.

  Here's (hopefully) simple instructions ...

1/ Use an ftp program to get the latest sendmail (8.9.1) from ftp.sendmail.org, or get it from the Web at www.sendmail.org 

2/ Put this into a suitable directory, say /usr/local/src by typing

  mv sendmail.8.9.1.tar.gz /usr/local/src

(replace sendmail.8.9.1.tar.gz with the filename you actually download)

3/ uncompress this archive

  gunzip sendmail.8.9.1.tar.gz

4/ extract this archive

  tar xf sendmail.8.9.1.tar

5/ build sendmail ...

  cd sendmail-8.9.1/src
  sh Build

6/ Put the sendmail binary where it should be

  mv obj*/sendmail /usr/lib/sendmail

7/ set its protections

  chmod 4551 /usr/lib/sendmail
  chown root /usr/lib/sendmail
  chgrp other /usr/lib/sendmail

8/ Go to the configuration file directory

  cd ../cf

9/ Make a configuration file called my.mc using an editor, that says ..

OSTYPE(solaris)dnl
DOMAIN(generic)
MAILER(local)
MAILER(smtp)

10/ Build it, using the following -

  m4 m4/cf.m4 my.mc > sendmail.cf

11/ Put it in place

  mv sendmail.cf /etc/sendmail.cf
  chmod 644 /etc/sendmail.cf
  chown root /etc/sendmail.cf
  chgrp other /etc/sendmail.cf

12/ Run it ...

  /usr/lib/sendmail -bd -q15m
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

680 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