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:
James E. Blair 2013-07-30 15:06:24 -07:00
parent 95938e8d2e
commit d20d424cac
5 changed files with 51 additions and 1 deletions

View File

@ -1,5 +1,6 @@
class exim( class exim(
$mailman_domains = [], $mailman_domains = [],
$queue_interval = '30m',
$sysadmin = [] $sysadmin = []
) { ) {
@ -13,13 +14,35 @@ class exim(
service { 'postfix': service { 'postfix':
ensure => stopped 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': service { 'exim':
ensure => running, ensure => running,
name => $::exim::params::service_name, name => $::exim::params::service_name,
hasrestart => true, hasrestart => true,
subscribe => File[$::exim::params::config_file], subscribe => [File[$::exim::params::config_file],
File[$::exim::params::sysdefault_file]],
require => Package[$::exim::params::package], require => Package[$::exim::params::package],
} }

View File

@ -9,12 +9,14 @@ class exim::params {
$service_name = 'exim' $service_name = 'exim'
$config_file = '/etc/exim/exim.conf' $config_file = '/etc/exim/exim.conf'
$conf_dir = '/etc/exim/' $conf_dir = '/etc/exim/'
$sysdefault_file = '/etc/sysconfig/exim'
} }
'Debian': { 'Debian': {
$package = 'exim4-daemon-light' $package = 'exim4-daemon-light'
$service_name = 'exim4' $service_name = 'exim4'
$config_file = '/etc/exim4/exim4.conf' $config_file = '/etc/exim4/exim4.conf'
$conf_dir = '/etc/exim4' $conf_dir = '/etc/exim4'
$sysdefault_file = '/etc/default/exim4'
} }
default: { default: {
fail("Unsupported osfamily: ${::osfamily} The 'exim' module only supports osfamily Debian or RedHat (slaves only).") fail("Unsupported osfamily: ${::osfamily} The 'exim' module only supports osfamily Debian or RedHat (slaves only).")

View File

@ -0,0 +1,2 @@
DAEMON=yes
QUEUE=<%= queue_interval %>

View 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=''

View File

@ -15,6 +15,7 @@ class openstack_project::lists(
class { 'exim': class { 'exim':
sysadmin => $listadmins, sysadmin => $listadmins,
queue_interval => '5m',
mailman_domains => [$listdomain], mailman_domains => [$listdomain],
} }