sendmail_enable in rc.conf

Giorgos Keramidas keramida at
Thu Apr 27 01:37:01 UTC 2006

On 2006-04-27 06:41, applecom at wrote:
> I have FreeBSD 6.0-RELEASE.
> It seems there is collision between /etc/defaults/rc.conf and
> /etc/rc.sendmail in sendmail startup control.
> In /etc/defaults/rc.conf:
> sendmail_enable="NO"    # Run the sendmail inbound daemon (YES/NO).
> In /etc/rc.sendmail:
> "<...>
> start_mta()
> {
>         case ${sendmail_enable} in
>         [Nn][Oo][Nn][Ee])
>                 ;;
> <...>".
> So sendmail doesn't startup during system startup only if there is
> "sendmail_enable="NONE"" in /etc/rc.conf.


> Maybe I don't understand something?

Yes, you are missing something.  The `sendmail_enable' variable is
overloaded for two different purposes, which do not necessarily conflict
with each other.

	This disables _only_ the ``inbound Sendmail daemon''.

	This value disables _all_ Sendmail daemons.

The fine difference here is that in recent Sendmail versions, Sendmail
can run one or more daemons for:

    - Receiving email messages from local programs.  This is the
      submission daemon, listening by default only to port

      The fine-grained tunable for this daemon is `sendmail_submit_enable'.

    - Handing off locally submitted messages from the `submit' queue to
      a mail relay server (`SMART_HOST' in Sendmail's language).  This
      is very useful when combined with `sendmail_submit_enable' if you
      are not running a publicly visible mail server.  You can use the
      `submit' daemon as a queueing mechanism for locally sent email and
      periodically flush its queue, sending all outgoing messages on
      their way out with the Sendmail MSP queue runner.

      The tunable for the MSP queue runner is `sendmail_msp_queue_enable'.

      | NOTE: With these two options (`sendmail_submit_enable' and its
      | companion, `sendmail_msp_queue_enable') in mind, my usual
      | `rc.conf' options for workstation machines, that mostly send
      | local email to local users and forward everything else through a
      | SMART_HOST to the world, are:
      |     sendmail_enable="NO"
      |     sendmail_outbound_enable="NO"
      |     sendmail_submit_enable="YES"
      |     sendmail_msp_queue_enable="YES"
      | This, and a proper `SMART_HOST' in my `/etc/mail/'
      | file, are all it takes to have email flowing out of a simple
      | workstation system.

    - On a publicly visible mail server (i.e. one that hosts email for
      one or more domains that are visible on the wide Internet), you
      will almost certainly need to use sendmail_enable="YES" too, to
      make sure a Sendmail daemon listens on all the non-localhost

    - The fourth option, `sendmail_outbound_enable', is something you
      will probably never need with Sendmail.  Don't worry about it yet.

More information about the freebsd-questions mailing list