what runs sendmail at 5:01am?

I have a 13.0-RELEASE system newly set up, and sendmail_enable="NONE" set in /etc/rc.conf.

However, last night at 5:01am, a series of messages with sendmail complains popped up:
Code:
Apr 29 05:01:00 vulcan sendmail[2595]: My unqualified host name (vulcan) unknown; sleeping for retry
Apr 29 05:02:00 vulcan sendmail[2595]: unable to qualify my own domain name (vulcan) -- using short name
Both messages repeated 6 times: shortly after 5:01am, around 5:53am and around 6:42am.

What's trying to run sendmail here? My guess is that it's periodic trying to drop a mail to root. Can I make this work without bothering to set up sendmail properly?
 
If it's coming from periodic, you can tweak rc.conf to send output to log files instead of mail. That's what I do, it's simply more convenient for me to do it that way. Here's what I have in my /etc/periodic.conf.
Code:
#periodic.conf overrides
# output to file
daily_output="/var/log/daily.log"
daily_status_security_output="/var/log/dailysecurity.log"
daily_status_network_usedns="NO"
daily_status_named_usedns="NO"
daily_clean_tmps_enable="YES"
daily_status_ntpd_enable="NO"
daily_status_zfs_enable="YES"
daily_scrub_zfs_enable="NO"    # set to YES for autoscrubbing at threshold days
daily_scrub_zfs_default_threshold="45"          # days between scrubs
daily_status_smart_enable="YES"
daily_status_smart_devices="/dev/ada0"
daily_queuerun_enable="NO"
weekly_output="/var/log/weekly.log"
weekly_status_security_output="/var/log/weeklysecurity.log"
monthly_output="/var/log/monthly.log"
monthly_status_security_output="/var/log/monthlysecurity.log"
You may also need to add entries to /etc/newsyslog.conf.d so files get rotated correctly.

As for what is causing it:
cd /var/spool/clientmqueue
then simply take a look at the contents, that should give you a clue as to what is generating them.

Keep in mind, the above is how I prefer doing it; others prefer email.
 
  • Thanks
Reactions: mtu
, and sendmail_enable="NONE" set in /etc/rc.conf.
This might not turn off sendmail anymore.

Code:
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
This will make sure it completely stops.

Can I make this work without bothering to set up sendmail properly?
Sendmail should actually work pretty much out of the box. At least for local mail. If you need to forward or send the mail to an external host then you need to configure it. But if you just leave the mail on the host itself then you don't need to configure anything. Just make sure you use a "proper" hostname in /etc/rc.conf. There needs to be at least one dot in the hostname, so hostname.domain. The domain part can be entirely fictitious, it doesn't need to be a "real" domain name (unless you plan on making this host send email to somewhere else, but even then you can fix this on your company's mail host for example).
 
  • Thanks
Reactions: mtu
SirDice is correct about the sendmail knobs in rc.conf. Lots of good stuff in /etc/defaults/*.conf, with comments. These sometimes change when upgrading, so I tend to double check after upgrading.

sendmail_enable looks to be for "inbound daemon"
sendmail_submit_enable is for "localhost only MTA" which applies to mail from cron stuff
the other two apply to running the mail queues.

If you look at /etc/rc.d/sendmail, there is a single hook to disable everything:
sendmail_enable="NONE"

Setting that in your /etc/rc.conf does all 4 lines above.
 
Back
Top