Bug 181795

Summary: Periodic daily/500.queuerun doesn't check 'sendmail_enable' in rc.conf
Product: Base System Reporter: karl
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: eugen
Priority: Normal    
Version: 9.2-BETA2   
Hardware: Any   
OS: Any   

Description karl 2013-09-04 07:10:01 UTC
The periodic script '/etc/periodic/daily/500.queuerun' doesn't check any values from '/etc/rc.conf'.

e.g. If in '/etc/rc.conf' you set 'sendmail_enable="NONE"' - 500.queuerun will still blindly fire up sendmail to do the 'daily queue run' by default, even if your system isn't using sendmail - or worse, even if you have set 'sendmail_enable="NONE"' - and have a very large queue of mail on there, 'on hold' - having not started any sendmail queue runners.

500.queuerun will start a queue runner for you - regardless when it runs, thus draining the queues over night (which is not what you'd expect if 'sendmail_enable="NONE"' is set?)

The script does check for the presence of a sendmail executable - but not if the system has sendmail effectively 'disabled'.

Fix: 

Make '/etc/periodic/daily/500.queurun' check/honour the value of 'sendmail_enable' in /etc/rc.conf.
How-To-Repeat: Set '/etc/rc.conf' so 'sendmail_enable="NONE"' - make sure no sendmail queue runner is running, and put a lot of mail on the host.

When 500.queuerun runs, it will dequeue all the mail - even though rc.conf has 'sendmail_enable="NONE"'.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:20 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2020-08-01 09:49:25 UTC
If you don't need /etc/periodic/daily/500.queuerun then create /etc/periodic.conf and write there: daily_queuerun_enable=NO