--- /dev/null
+class nodo::mail inherits nodo::vserver {
+ # Class for mail nodes
+ $postfix_relayhost = "$domain"
+ $postfix_smtp_listen = "$ip"
+ $postfix_mydestination = "\$myorigin"
+
+ include postfix::mta
+}
# Define a vserver instance
define instance($context, $ensure = 'running', $proxy = false,
- $puppetmaster = false, $gitd = false,
+ $puppetmaster = false, $gitd = false, $mail = false,
$icecast = false, $sound = false, $ticket = false,
$memory_limit = false) {
order => '901',
}
}
+ if $mail {
+ shorewall::rule { 'mail-1':
+ action => 'DNAT',
+ source => 'net',
+ destination => "fw:192.168.0.$context:25",
+ proto => 'tcp',
+ destinationport => '25',
+ ratelimit => '-',
+ order => '1000',
+ }
+
+ shorewall::rule { 'mail-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "fw:192.168.0.$context:25",
+ proto => 'tcp',
+ destinationport => '25',
+ originaldest => "$ipaddress",
+ ratelimit => '-',
+ order => '1001',
+ }
+ }
}
}
}