$mxdata = dig($deprecated::nodeinfo, 'ldap', 'mXRecord')
+ $mailport = lookup( { 'name' => 'exim::mail_port', 'default_value' => 25 } )
+
if $mxdata and $mxdata.any |$item| { $item =~ /INCOMING-MX/ } {
# a mail satellite. Gets mail via the mailrelays and sends out mail via the mail relays
- $mailport = lookup( { 'name' => 'exim::mail_port', 'default_value' => undef } )
@@concat::fragment { "manualroute-to-${::fqdn}":
tag => 'exim::manualroute::to::mailrelay',
target => '/etc/exim4/manualroute',
- content => $mailport == undef ? {
- true => "${::fqdn}: ${::fqdn}",
- default => "${::fqdn}: ${::fqdn}::${mailport}",
- }
+ content => "${::fqdn}: ${::fqdn}::${mailport}",
}
@@ferm::rule::simple { "submission-from-${::fqdn}":
}
Ferm::Rule::Simple <<| tag == 'smtp::server::to::mail-satellite' |>> {
- port => $mailport == undef ? {
- true => 25,
- default => $mailport,
- }
+ port => $mailport
}
} else {