From owner-freebsd-questions Fri Sep 6 1:57:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90B7237B400 for ; Fri, 6 Sep 2002 01:57:28 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79F0A43E3B for ; Fri, 6 Sep 2002 01:57:27 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk ([IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.5/8.12.5) with ESMTP id g868vPGk038811; Fri, 6 Sep 2002 09:57:25 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.5/8.12.5/Submit) id g868vJKG038806; Fri, 6 Sep 2002 09:57:19 +0100 (BST) Date: Fri, 6 Sep 2002 09:57:19 +0100 From: Matthew Seaman To: Doug Hardie Cc: freebsd-questions@FreeBSD.ORG Subject: Re: sendmail 8.12 structure Message-ID: <20020906085719.GC34657@happy-idiot-talk.infracaninophi> References: <20020604180503.A29935@seekingfire.com> <20020604172401.A68777@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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