staticsync::user: 'staticsync'
staticsync::basedir: '/srv/static.debian.org'
exim::smarthost: 'mailout.debian.org'
+postfix::smarthost: 'mailout.debian.org'
roles::dns_primary::allow_access:
# easydns
+# postfix class
+# @param use_smarthost use the smarthost
+# @param smarthost host to relay through (if set and use_smarthost)
class postfix(
+ Optional[String] $smarthost,
+ Boolean $use_smarthost = true,
Boolean $manage_maincf = true,
) {
package { 'postfix':
ensure => installed
}
+ if $use_smarthost {
+ if ! smarthost {
+ fail('No smarthost set but use_smarthost is true')
+ }
+ } else {
+ $heavy = true
+ }
+
service { 'postfix':
ensure => running
}
compatibility_level = 2
smtp_dns_support_level = dnssec
-<%- if scope.lookupvar('deprecated::nodeinfo')['smarthost'].empty? -%>
-smtp_tls_security_level = dane
-<%- else -%>
+<%- if @use_smarthost -%>
smtp_tls_security_level = dane-only
# yes, do MX lookups on the relayhost, since those have TLSA records
-relayhost = <%= scope.lookupvar('deprecated::nodeinfo')['smarthost'] %>:submission
+relayhost = <%= @smarthost %>:submission
+<%- else -%>
+smtp_tls_security_level = dane
<%- end -%>
# tls stuff