Accept configurable routers/transports

Allow complete definitions of routers and transports to be provided
to the exim class which will then be added to the exim4.conf file.

Change-Id: Id4f69580eb126d058ee699f4e7bfdb01cfc7409c
This commit is contained in:
James E. Blair 2016-01-20 09:22:46 -08:00
parent 93ed59ce0e
commit 11f9d34a2a
2 changed files with 29 additions and 1 deletions

View File

@ -4,7 +4,9 @@ class exim(
$queue_run_max = '5',
$queue_smtp_domains = undef,
$smarthost = false,
$sysadmins = []
$sysadmins = [],
$transports = [],
$routers = []
) {
include ::exim::params

View File

@ -559,6 +559,19 @@ acl_check_data:
begin routers
<% @routers.each do |router| -%>
<% router.each_pair do |name, values| -%>
<%= name %>:
<% values.each_pair do |k, v| -%>
<% if v == true -%>
<%= k %>
<% else -%>
<%= k %> = <%= v %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% if @mailman_domains.length > 0 -%>
# Pick up on messages from our local mailman and route them via our
# special VERP-enabled transport
@ -783,6 +796,19 @@ mailman_verp_smtp:
headers_add = Errors-To: ${return_path}
<% end -%>
<% @transports.each do |transport| -%>
<% transport.each_pair do |name, values| -%>
<%= name %>:
<% values.each_pair do |k, v| -%>
<% if v == true -%>
<%= k %>
<% else -%>
<%= k %> = <%= v %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
######################################################################
# RETRY CONFIGURATION #
######################################################################