diff --git a/manifests/init.pp b/manifests/init.pp index a3838eb..17e3d9e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -21,15 +21,17 @@ # http://www.exim.org/exim-html-current/doc/html/spec_html/index.html class exim( - $local_domains = '@', - $mailman_domains = [], - $queue_interval = '30m', - $queue_run_max = '5', - $queue_smtp_domains = undef, - $routers = [], - $smarthost = false, - $sysadmins = [], - $transports = [], + $local_domains = '@', + $mailman_domains = [], + $queue_interval = '30m', + $queue_run_max = '5', + $queue_smtp_domains = undef, + $routers = [], + $smarthost = false, + $sysadmins = [], + $transports = [], + $smtp_accept_max = undef, + $smtp_accept_max_per_host = undef, ) { include ::exim::params diff --git a/templates/exim4.conf.erb b/templates/exim4.conf.erb index de9b63d..6f8bcf5 100644 --- a/templates/exim4.conf.erb +++ b/templates/exim4.conf.erb @@ -312,9 +312,9 @@ queue_run_max = <%= @queue_run_max %> # to be queued in this way, and is equivalent to setting # queue_smtp_domains to "*". See also hold_domains and queue_domains. -<% if @queue_smtp_domains != "" -%> +<% unless ["", nil, :undef].include?(@queue_smtp_domains) -%> queue_smtp_domains = <%= @queue_smtp_domains %> -<% end %> +<% end -%> <% if @mailman_domains.length > 0 -%> # Home dir for your Mailman installation -- aka Mailman's prefix @@ -349,6 +349,16 @@ MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck dns_ipv4_lookup = *.gmail.com : *.google.com +<% unless ["", nil, :undef].include?(@smtp_accept_max) -%> +# simultaneous incoming connections +smtp_accept_max = <%= @smtp_accept_max %> +<% end -%> + +<% unless ["", nil, :undef].include?(@smtp_accept_max_per_host) -%> +# connections from one host +smtp_accept_max_per_host = <%= @smtp_accept_max_per_host %> +<% end -%> + ###################################################################### # ACL CONFIGURATION # # Specifies access control lists for incoming SMTP mail #