port => '7', # will be overwritten on collection
saddr => $base::public_addresses,
}
+
+ ferm::rule::simple { 'submission-from-satellites':
+ target => 'submission',
+ port => 'submission',
+ }
+ Ferm::Rule::Simple <<| tag == 'smtp::server::submission::to::mail-relay' |>>
}
$mxdata = dig($deprecated::nodeinfo, 'ldap', 'mXRecord')
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}":
}
}
+ @@ferm::rule::simple { "submission-from-${::fqdn}":
+ tag => 'smtp::server::submission::to::mail-relay',
+ chain => 'submission',
+ saddr => $base::public_addresses,
+ }
+
Ferm::Rule::Simple <<| tag == 'smtp::server::to::mail-satellite' |>> {
port => $mailport == undef ? {
true => 25,
default => $mailport,
}
}
+
} else {
+ # not a mail satellite
+
if ! defined(Class['exim::mx']) and ! defined(Class['postfix']) {
fail('We are not an exim::mx (or a postfix) yet do not have set our MXs to INCOMING-MX.')
}
+
ferm::rule::simple { 'dsa-smtp':
description => 'Allow smtp access from the world',
port => '25',