Bug 181795 - Periodic daily/500.queuerun doesn't check 'sendmail_enable' in rc.conf
Summary: Periodic daily/500.queuerun doesn't check 'sendmail_enable' in rc.conf
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 9.2-BETA2
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-04 07:10 UTC by karl
Modified: 2020-08-01 09:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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