Solved

Stop Sendmail from relaying mail under SunOS

Posted on 1998-11-27
2
382 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
SSH commands for Nas4free 21 462
Compare if date string is within text file 3 65
cron job says it ran, no results 25 122
unix example issues 18 99
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

831 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