NCSA Home
Contact Us | Intranet | Search

Setting up sendmail on your client


Summary

This document contains the directions for installing, configuring and running Berkeley's sendmail on your Unix client. While this covers several aspects of setting this up on most platforms, there are always exceptions to rules which may complicate the process. I will attempt to address all pertinent issues.

The current version of Sendmail from Berkeley is 8.8.8. This version has security enhancments for all known sendmail bugs.

Before installing and configuring the daemon, you need to determine what function you would like the sendmail process to perform. The basic disinction here is whether you want your computer to accept/deliver mail (full client) or just handoff mail (nullclient) to a smart host, in our case, smtp.ncsa.uiuc.edu.

Most people choose to have their sendmail client act as a nullclient. This means that all mail that is generated on your machine is handed off to a smart host (NCSA's internal mail server) that can deliver to other hosts. Being a nullclient means that any mail generated on that machine has a return address of @ncsa.uiuc.edu appended to any user that sends mail from that machine. Also, being a nullclient adds an extra level of security since your sendmail daemon does not run in daemon (accept) mode.

If you choose to have a fullclient, you can choose to have your return address include your host's fully qualified domain name. For example, on host foo, your return address would be user@foo.ncsa.uiuc.edu. Being a full client means that you must be responsible for the mailer on the machine (making sure it's running, maintaining an alias file if necessary, etc).

IMPORTANT: If you want to run a fullclient you must verify that your host has an MX record of 0. This can be accomplished by using nslookup.

  1. Type nslookup on your Unix machine.
  2. At the > prompt, type: set type=mx
  3. At the > prompt, type: <your machine name>.

This machine does NOT have an MX record pointing to itself.

rasputin.ncsa.uiuc.edu  preference = 100, mail exchanger = ex1.ncsa.uiuc.edu
rasputin.ncsa.uiuc.edu  preference = 500, mail exchanger = ex2.ncsa.uiuc.edu

This machine HAS an MX records pointing to itself.

wolrab.ncsa.uiuc.edu    preference = 0, mail exchanger = wolrab.ncsa.uiuc.edu
wolrab.ncsa.uiuc.edu    preference = 100, mail exchanger = ex1.ncsa.uiuc.edu
wolrab.ncsa.uiuc.edu    preference = 500, mail exchanger = ex2.ncsa.uiuc.edu
To request an MX record of 0, visit the DNSForm . Choose "Any other type of DNS request".

Install the Sendmail Binary

The first step is to install the sendmail binary on your machine. As root:
  1. cd /afs/ncsa/src/mail/sendmail/current/
  2. Of the directories listed, choose what platform and operating system that best suits your needs. NOTE: On IRIX, choosing the O/S revision will most likely work without regard to platform.
  3. cd to the directory that best suits your situation
  4. cp sendmail /usr/lib/sendmail
  5. cp sendmail.h* /usr/lib/
  6. chmod 4551 /usr/lib/sendmail
  7. chown root /usr/lib/sendmail
  8. chgrp daemon /usr/lib/sendmail
  9. chmod 644 /usr/lib/sendmail.h*

Permissions

Permissions are very important!!! Here are a few guidelines:

  • chmod 700 /usr/spool/mqueue
  • chown root /usr/spool/mqueue
  • chmod 4551 /usr/lib/sendmail
  • chmod 644 /usr/lib/sendmail.h*

    Choosing and Installing the Configuration File

    Here's the directions for a nullclient.
    1. cd /afs/ncsa.uiuc.edu/src/mail/sendmail/current/cf
    2. ls -l *hand*.cf
    3. Choose the file which matches your architecture
    4. cp architecture-handoff.cf /etc/sendmail.cf
    5. chmod 644 /etc/sendmail.cf

    Here's the directions for a fullclient.

    1. cd /afs/ncsa.uiuc.edu/src/mail/sendmail/sendmail-8.8.8/cf/cf
    2. ls -l ncsa*
    3. Choose the file which matches your architecture
    4. cp ncsa-architecture.cf /etc/sendmail.cf
    5. chmod 644 /etc/sendmail.cf

    Starting the Sendmail daemon

    nullclient
    /usr/lib/sendmail -q15m
    

    fullclient

    /usr/lib/sendmail -bd -q15m
    
    ** alter the rc script to start the daemon in the proper mode **


    If you are running the binary in daemon mode (accepting mail) and you would like to implement rulesets to bounce unsolicited electronic mail click here .

  •