if $type == 'exim4' {
if $mailrelay {
include roles::mailrelay
+ } elsif $heavy {
+ include exim::mx
} else {
- if $heavy {
- include exim::mx
- } else {
- include exim
- }
-
- $mxdata = dig($deprecated::nodeinfo, 'ldap', 'mXRecord')
- if $mxdata and $mxdata.any |$item| { $item =~ /INCOMING-MX/ } {
- $mailport = lookup( { 'name' => 'exim::mail_port', 'default_value' => undef } )
-
-
- @@concat::fragment { "manualroute-to-${::fqdn}":
- tag => 'exim::manualroute::to::mailrelay',
- target => '/etc/exim4/manualroute-new',
- content => $mailport == undef ? {
- true => "${::fqdn}: ${::fqdn}",
- default => "${::fqdn}: ${::fqdn}::${mailport}",
- }
- }
-
- Ferm::Rule::Simple <<| tag == 'smtp::server::from::mailrelay' |>> {
- port => $mailport == undef ? {
- true => 25,
- default => $mailport,
- }
- }
- }
+ include exim
}
} elsif $type == 'postfix' {
if $mailrelay {
} else {
fail("Unexpected mta type ${type}")
}
+
+
+ $mxdata = dig($deprecated::nodeinfo, 'ldap', 'mXRecord')
+ if $mxdata and $mxdata.any |$item| { $item =~ /INCOMING-MX/ } {
+ $mailport = lookup( { 'name' => 'exim::mail_port', 'default_value' => undef } )
+
+ @@concat::fragment { "manualroute-to-${::fqdn}":
+ tag => 'exim::manualroute::to::mailrelay',
+ target => '/etc/exim4/manualroute-new',
+ content => $mailport == undef ? {
+ true => "${::fqdn}: ${::fqdn}",
+ default => "${::fqdn}: ${::fqdn}::${mailport}",
+ }
+ }
+
+ Ferm::Rule::Simple <<| tag == 'smtp::server::from::mailrelay' |>> {
+ port => $mailport == undef ? {
+ true => 25,
+ default => $mailport,
+ }
+ }
+ }
}