Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2002 09:57:19 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Doug Hardie <bc979@lafn.org>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: sendmail 8.12 structure
Message-ID:  <20020906085719.GC34657@happy-idiot-talk.infracaninophi>
In-Reply-To: <f05111b59b99defefeed4@[10.0.1.90]>
References:  <20020604180503.A29935@seekingfire.com> <20020604172401.A68777@xor.obsecurity.org> <f05111b59b99defefeed4@[10.0.1.90]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 05, 2002 at 10:44:12PM -0700, Doug Hardie wrote:
> I am starting to configure sendmail 8.12 for the first time for a 
> number of servers.  Reading the info in the various READMEs and on 
> sendmail.org's web site I thought I understood what I needed to do. 
> However, the rc.sendmail in 4.6.2 has 4 possible sendmail processes 
> that it starts.  Is there a description of those possible processes 
> and how they function - how to pick which one/ones you need for a 
> particular situation?  I am completely baffled by the sm-queue 
> process.  It lookes like it does the same thing as the sm-mta process 
> which also has the -q set.  Does mail sent from a local user to to 
> the client queue and then to the mail queue?  I am sure this kind of 
> info must exist somewhere but haven't been able to find it in any of 
> the archives.

With sendmail-8.12.x, sendmail functionality has been divided between
two processes:

    sm-mta: SendMail Mail Transmission Agent, which is responsible for
    receiving messages from other machines or sending them off to
    other machines or, ultimately, handing the messages off to the
    local delivery agent.

    sm-msp: SendMail Mail Submission Process, which is the process
    that mail user agents (mail, mutt, pine, etc) use to inject a new
    message into the system.  

The reason for this is that it allows sendmail to be run without
having to be setuid root.  If you wish, you can restore the setuid bit
to sendmail (/usr/libexec/sendmail/sendmail) and run it in the old
way, but the new way really is preferable (See the
SENDMAIL_SET_USER_ID variable in /etc/defaults/make.conf).

These setting from /etc/defaults/rc.conf enable this --- by default,
sendmail is enabled, so you don't actually need to override any
settings in /etc/rc.conf if this is what you want:

    sendmail_enable="YES"   # Run the sendmail inbound daemon (YES/NO/NONE).
                            # If NONE, don't start any sendmail processes.
    sendmail_flags="-L sm-mta -bd -q30m" # Flags to sendmail (as a server)
    sendmail_submit_enable="YES"    # Start a localhost-only MTA for mail submission
    sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost"

Now, with the 8.10.x or older versions of sendmail, you could run it
in a send-only configuration, so that it wouldn't listen on port 25,
but it would check the mail queue regularly, and send out any queued
up messages.

The same is true of the new sendmail 8.12.x except that you need to
run two sendmail instances -- one for the mta, and the other for the
msp function.  You also need to disable the usual daemons.

These settings from /etc/defaults/make.conf control the send-only
sendmail setup:

    sendmail_outbound_enable="YES"  # Dequeue stuck mail (YES/NO).
    sendmail_outbound_flags="-L sm-queue -q30m" # Flags to sendmail (outbound only)
    sendmail_msp_queue_enable="YES" # Dequeue stuck clientmqueue mail (YES/NO).
    sendmail_msp_queue_flags="-L sm-msp-queue -Ac -q30m"
                                    # Flags for sendmail_msp_queue daemon.


To enable the send-only functionality you need:

    sendmail_enable="NO"
    sendmail_submit_enable="NO"
    sendmail_outbound_enable="YES"
    sendmail_msp_queue_enable="YES"

(Note: this prevents the sm-msp process listening on port 587, which
may or may not be what you want.)

If you don't want sendmail to run at all, then all you need in
/etc/rc.conf is:

    sendmail_enable="NONE"

	Cheers,

	Matthew
	
-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020906085719.GC34657>