Add queue runner interval option to exim
Set it to default to 30m (the Debian default). Set it to 5m on lists.o.o. Change-Id: Iab817ae93a9e9655abf41713f70048870652a635
This commit is contained in:
parent
95938e8d2e
commit
d20d424cac
@ -1,5 +1,6 @@
|
||||
class exim(
|
||||
$mailman_domains = [],
|
||||
$queue_interval = '30m',
|
||||
$sysadmin = []
|
||||
) {
|
||||
|
||||
@ -13,13 +14,35 @@ class exim(
|
||||
service { 'postfix':
|
||||
ensure => stopped
|
||||
}
|
||||
file { $::exim::params::sysdefault_file:
|
||||
ensure => present,
|
||||
content => template("${module_name}/exim.sysconfig.erb"),
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
require => Package[$::exim::params::package],
|
||||
}
|
||||
}
|
||||
|
||||
if ($::osfamily == 'Debian') {
|
||||
file { $::exim::params::sysdefault_file:
|
||||
ensure => present,
|
||||
content => template("${module_name}/exim4.default.erb"),
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
require => Package[$::exim::params::package],
|
||||
}
|
||||
}
|
||||
|
||||
service { 'exim':
|
||||
ensure => running,
|
||||
name => $::exim::params::service_name,
|
||||
hasrestart => true,
|
||||
subscribe => File[$::exim::params::config_file],
|
||||
subscribe => [File[$::exim::params::config_file],
|
||||
File[$::exim::params::sysdefault_file]],
|
||||
require => Package[$::exim::params::package],
|
||||
}
|
||||
|
||||
|
@ -9,12 +9,14 @@ class exim::params {
|
||||
$service_name = 'exim'
|
||||
$config_file = '/etc/exim/exim.conf'
|
||||
$conf_dir = '/etc/exim/'
|
||||
$sysdefault_file = '/etc/sysconfig/exim'
|
||||
}
|
||||
'Debian': {
|
||||
$package = 'exim4-daemon-light'
|
||||
$service_name = 'exim4'
|
||||
$config_file = '/etc/exim4/exim4.conf'
|
||||
$conf_dir = '/etc/exim4'
|
||||
$sysdefault_file = '/etc/default/exim4'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${::osfamily} The 'exim' module only supports osfamily Debian or RedHat (slaves only).")
|
||||
|
2
modules/exim/templates/exim.sysconfig.erb
Normal file
2
modules/exim/templates/exim.sysconfig.erb
Normal file
@ -0,0 +1,2 @@
|
||||
DAEMON=yes
|
||||
QUEUE=<%= queue_interval %>
|
22
modules/exim/templates/exim4.default.erb
Normal file
22
modules/exim/templates/exim4.default.erb
Normal file
@ -0,0 +1,22 @@
|
||||
# /etc/default/exim4
|
||||
EX4DEF_VERSION=''
|
||||
|
||||
# 'combined' - one daemon running queue and listening on SMTP port
|
||||
# 'no' - no daemon running the queue
|
||||
# 'separate' - two separate daemons
|
||||
# 'ppp' - only run queue with /etc/ppp/ip-up.d/exim4.
|
||||
# 'nodaemon' - no daemon is started at all.
|
||||
# 'queueonly' - only a queue running daemon is started, no SMTP listener.
|
||||
# setting this to 'no' will also disable queueruns from /etc/ppp/ip-up.d/exim4
|
||||
QUEUERUNNER='combined'
|
||||
# how often should we run the queue
|
||||
QUEUEINTERVAL='<%= queue_interval %>'
|
||||
# options common to quez-runner and listening daemon
|
||||
COMMONOPTIONS=''
|
||||
# more options for the daemon/process running the queue (applies to the one
|
||||
# started in /etc/ppp/ip-up.d/exim4, too.
|
||||
QUEUERUNNEROPTIONS=''
|
||||
# special flags given to exim directly after the -q. See exim(8)
|
||||
QFLAGS=''
|
||||
# options for daemon listening on port 25
|
||||
SMTPLISTENEROPTIONS=''
|
@ -15,6 +15,7 @@ class openstack_project::lists(
|
||||
|
||||
class { 'exim':
|
||||
sysadmin => $listadmins,
|
||||
queue_interval => '5m',
|
||||
mailman_domains => [$listdomain],
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user