aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-04-24 14:00:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-04-24 14:00:50 -0300
commitdb0a70a51ab316e5f4af92e0f92371ad366c64b6 (patch)
treec68348faa141460bc854011d87aaf4ca82477495 /manifests/vserver.pp
parentfc32e4e56a9bfd22ff9945a7d52161748306160f (diff)
downloadpuppet-nodo-db0a70a51ab316e5f4af92e0f92371ad366c64b6.tar.gz
puppet-nodo-db0a70a51ab316e5f4af92e0f92371ad366c64b6.tar.bz2
Adding nodo::mail
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp24
1 files changed, 23 insertions, 1 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 72406ca..b8ae60e 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -31,7 +31,7 @@ class nodo::vserver inherits nodo {
# 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) {
@@ -308,6 +308,28 @@ class nodo::vserver inherits nodo {
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',
+ }
+ }
}
}
}