Solved

Stop Sendmail from relaying mail under SunOS

Posted on 1998-11-27
2
377 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now