Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Stop Sendmail from relaying mail under SunOS

Posted on 1998-11-27
2
Medium Priority
?
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Author Comment

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

Accepted Solution

by:
davidmwilliams earned 400 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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 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.:
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.
Suggested Courses

618 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