I do not use emails on my FreeBSD machine so I did not bother setting it up. But it runs at startup and apparently prevents other services from starting till it finishes its job (I cannot ssh into this machine till sendmail decides it has had enough and stops).

Change these lines to /etc/mail/mailer.conf to

1
2
3
4
5
sendmail   /usr/bin/true
mailq      /usr/bin/true
newaliases /usr/bin/true
hoststat   /usr/bin/true
purgestat  /usr/bin/true 

And in /etc/periodic/periodic.conf to

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# disable sendmail (mailqueue) cleanups:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_mailq_enable="NO"
daily_submit_queuerun="NO"

# disable periodic's emailing by logging!
daily_output=/var/log/daily.log
weekly_output=/var/log/weekly.log
monthly_output=/var/log/monthly.log

# put these into the log, instead of trying to mail them
daily_status_security_inline="YES"
weekly_status_security_inline="YES"
monthly_status_security_inline="YES"

And in /etc/rc.conf to

1
2
3
4
5
6
7
8
# disable sendmail
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
sendmail_outbound_enable="NO"

# don't allow cron to mail
cron_flags="-m ''"

Instructions taken from https://gist.github.com/igalic/c77ed494e102977c9fd06ce9b053cda0