diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 478171502f..b641ddaf41 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -3,6 +3,7 @@ class exim( $queue_interval = '30m', $queue_run_max = '5', $queue_smtp_domains = '', + $smarthost = false, $sysadmin = [] ) { diff --git a/modules/exim/templates/exim4.conf.erb b/modules/exim/templates/exim4.conf.erb index 7fb1ff07e4..e3b424c707 100644 --- a/modules/exim/templates/exim4.conf.erb +++ b/modules/exim/templates/exim4.conf.erb @@ -606,12 +606,21 @@ mailman_router: # If the DNS lookup fails, no further routers are tried because of the no_more # setting, and consequently the address is unrouteable. +<% if smarthost -%> +smarthost: + driver = manualroute + domains = !+local_domains + transport = remote_smtp + route_list = * <%= smarthost %> + no_more +<% else -%> dnslookup: driver = dnslookup domains = ! +local_domains transport = remote_smtp ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 no_more +<% end -%> # The remaining routers handle addresses in the local domain(s), that is those # domains that are defined by "domainlist local_domains" above. diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp index c287846fb4..630d60b939 100644 --- a/modules/gerrit/manifests/init.pp +++ b/modules/gerrit/manifests/init.pp @@ -18,6 +18,10 @@ # The URL to use for OpenID in SSO mode. # email: # The email address Gerrit should use when sending mail. +# smtpserver: +# The smtp server that Gerrit should send mail through. +# sendemail_from: +# gerrit.conf value for sendemail.from. # database_poollimit: # container_heaplimit: # core_packedgitopenfiles: @@ -96,6 +100,8 @@ class gerrit( $ldap_account_pattern = '', $ldap_account_email_address = '', $email = '', + $smtpserver = 'localhost', + $sendemail_from = 'MIXED', $database_poollimit = '', $container_heaplimit = '', $core_packedgitopenfiles = '', diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 3f5e4cb58b..8ed0a19ddc 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -32,7 +32,8 @@ accountEmailAddress = <%= ldap_account_email_address %> <% end %> [sendemail] - smtpServer = localhost + smtpServer = <%= smtpserver %> + from = <%= sendemail_from %> [container] user = gerrit2 javaHome = <%= java_home %>