Disable sendmail on boot

On bootstrap, sendmail keeps me waiting for 10 to 20 seconds and flushes the message unqualified hostname ..... ..

How do I disable the sendmail?

I remember disabling it once in solaris 10 by using
svcadm disable sendmail

How do I do it in FreeBSD. Thanks again...

Follow up, if I disable sendmail, will all the mail function be disabled? like the mailing of info to root and other stuff?
 
Code:
In rc.conf:
sendmail_submit_enable="NO"    # Start a localhost-only MTA for mail submission
sendmail_outbound_enable="NO"  # Dequeue stuck mail (YES/NO).
sendmail_msp_queue_enable="NO" # Dequeue stuck clientmqueue mail (YES/NO).

You won't receive system mail. Better give your server a hostname and put it in /etc/hosts.
 
  • Thanks
Reactions: 0mp
I don't think so, because system mail gets offered to 127.0.0.1 for further delivery. And Sendmail won't be there to handle it.
 
It needs a fully qualified hostname, like mybsd.my.domain or mybsd.domain.local.
 
I have just restarted and no more unqualified error. I have added mybsd.my.domain in my /etc/hosts and retaining the system mail to active mode

Thanks again [solved]
 
Like cree@ said, this post is high in the search engine results. I stumbled upon it today, because I needed to disable this.

It seems like sendmail_enable="NONE" has been deprecated. Quoting rc.sendmail(8):

Code:
sendmail_enable
     (str) If set to "YES", run the sendmail(8) daemon at system boot
     time. If set to "NO", do not run a sendmail(8) daemon to listen
     for incoming network mail. This does not preclude a sendmail(8)
     daemon listening on the SMTP port of the loopback interface. The
     "NONE" option is deprecated and should not be used. It will be
     removed in a future release.

Code:
To completely prevent any sendmail(8) daemons from starting, you must
set the following variables in /etc/rc.conf:

sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
 
Back
Top