-
-
Save anezjonathan/ac834b6e7dd063cd1a2f0b2b053f353e to your computer and use it in GitHub Desktop.
disable sendmail on FreeBSD, completely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if with the below rc.conf and periodic.conf settings you somehow still see logs like | |
# Nov 28 03:01:00 webproxy sendmail[41991]: My unqualified host name (webproxy) unknown; sleeping for retry | |
# Nov 28 03:02:00 webproxy sendmail[41991]: unable to qualify my own domain name (webproxy) -- using short name | |
# Nov 28 03:56:50 webproxy sendmail[74256]: My unqualified host name (webproxy) unknown; sleeping for retry | |
# Nov 28 03:56:51 webproxy sendmail[87297]: My unqualified host name (webproxy) unknown; sleeping for retry | |
# Nov 28 03:57:51 webproxy sendmail[74256]: unable to qualify my own domain name (webproxy) -- using short name | |
# Nov 28 03:57:51 webproxy sendmail[87297]: unable to qualify my own domain name (webproxy) -- using short name | |
# we can kill it off like this: | |
sendmail /usr/bin/true | |
mailq /usr/bin/true | |
newaliases /usr/bin/true | |
hoststat /usr/bin/true | |
purgestat /usr/bin/true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# since sendmail_enable="NONE" is deprecated (since 2004, lol), this is how to disable all of 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 ''" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment