SUMMARY: I can't seem to get the sendmail.cf files that comewithSolaris 2.5.1 to work as a smart mailer.

From: Steve Poulsen (spoulsen@transcrypt.com)
Date: Wed May 20 1998 - 12:50:41 CDT


Thanks again for the responses. The first one listed below (Louis Hoo)
worked the best as far as getting it going fast. The only difference is I
had to comment out S6 which also configured the domain as being local, which
I didn't want. If I didn't comment it out, it would accept mail for:

host
host.domain.com
domain.com

But after I did, I got what I wanted:

host
host.domain.com

One again this list worked fast for me. Also found out that SUN's sendmail
should be replaced with v8 (see below) if it is going to be a mail server.
Since I am using this just for a few users, I will leave it alone until time
frees up. I also will look into QMail if time permits.

Steve Poulsen

----------------------------------------------------------------------------
-----
Here is an excerpt from the SUN sendmail PSD/FAQ

3.1: How To Set Up a Sun As An Internet Mailhost
------------------------------------------------

When setting up a Sendmail mailhost on the Internet, you should follow
the listed steps to ensure that the most basic configuration needs are
met. Other modification may be necessary to customize to your specific
environment.

1) Install the correct sendmail and sendmail.cf for a mailhost:

  mv /usr/lib/sendmail /usr/lib/sendmail.nonmx
  cp /usr/lib/sendmail.mx /usr/lib/sendmail
  cp /etc/mail/main.cf /etc/mail/sendmail.cf

Note: Under Solaris 2.5 and higher, the first two steps, involving
/usr/lib, are not necessary. Same holds try for sendmail v8 patches
on 2.3. and 2.4.

2) In the /etc/mail/sendmail.cf file, change the following:

a. Comment out the line:

  Dj$m

b. Uncomment the line:

  Dj$w.$m

c. Change the DM macro from "smartuucp" to ddn:

  DMddn

d. Define the Dm macro. Look for an example about "podunk.edu" and
   a blank line). Put this anywhere that blank line:

  Dm"Your domain name"

example:

  Dmfoo.bar.com

   NOTE: Dm NO SPACE AFTER THE "m" AND YOUR DOMAIN.

e. Comment out this line:

  R$*<@$*.$+>$* $#$M $@$R $:$1<@$2.$3>$4
user@any.domain
      f. Uncomment this line:

  #R$*<@$*.$+>$* $#ddn $@ $2.$3 $:$1<@$2.$3>$4
user@any.domain

Hint: in vi, search for ddn

g. If your host receives mail for multiple domains, add a "Cm" entry
   after the "Dm" in Step "d.". NOTE THERE IS A SPACE AFTER
the "Cm"!

e.g.
Cm mydomain.com testdomain.com

h. If your host is receiving mail under different names for "local"
    delivery, often you need to define those hosts in a "Cw" line:
e.g.
Cw www another-name and-another

3) Verify that DNS is working properly. Running the command "nslookup
sun.com" should return

  Name: sun.com
  Address: 192.9.9.1

In Solaris, dns must be defined in /etc/nsswitch.conf. In SunOS, NIS
must be running to use DNS.

4) Verify that the hosts file has been changed so that the machine is
identified as "mailhost".

The hosts file should look like:

  xxx.xxx.xxx.xxx doghouse mailhost loghost

5) Remember to stop and restart the sendmail daemon if any changes
have been made to the sendmail.cf file.

To stop sendmail:

  /etc/init.d/sendmail stop

To start sendmail:
   /etc/init.d/sendmail start

When all of this is complete, the mailhost should be able to correctly
deliver its own mail to the internet, and in addition it should be
able to accept mail from mailer clients, and pass that on to the
internet.
----------------------------------------------------------------------------
-----
  Solaris comes with very old version of sendmail which has tons of
   security holes in it. Your safest bet is to either upgrade to
   sendmail-v8 plus the latest named/bind release, or (much better) dump
   sendmail completely and use something like qmail.

   The M4 macros in the sendmail source code make it very easy to generate
   most sendmail.cf files. You write about 4 or 5 lines saying what
   features you want your mailer to support, and M4 writes the sendmail.cf
   file for you.

     QMail source plus docs:
          http://www.qmail.org/

     Sendmail source code:

ftp://ftp.cs.berkeley.edu/pub/sendmail -------------------------------------
--------------------------------------------
If this machine is going to be an internet mailserver, then you should
go to www.sendmail.org and get sendmail 8.8.9. It comes with sendmail.cf
rules to avoid relaying spam, and filters to keep out spam.
----------------------------------------------------------------------------
-----
I've got a webpage with a fairly good cookbook for compiling, installing
and configuring sendmail 8.8.8 on Solaris 2.5.1 Check it out at:
  http://www3.hmc.edu/docs/coolstuff/sendmail

You don't need to be any sort of expert. I list all the sym links that
you should install.
----------------------------------------------------------------------------
-----
Change DS to be blank and restart sendmail. Let me know if you need more
help.

DS
----------------------------------------------------------------------------
-----
See:
http://www.informatik.uni-kiel.de/%7Eca/email/sun.sendmail.fix.html

for a guide to configure Sun's sendmail.
----------------------------------------------------------------------------
-----
    You need to copy one of these two files to sendmail.cf. Sendmail only
uses the sendmail.cf file. Which one you use depends on the role of your
mail system. (Relay Host/Mail Host). The comments in each file dictate
which file is for which purpose.
----------------------------------------------------------------------------
-----



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:40 CDT