summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/mlmmj.pp38
-rw-r--r--manifests/system.pp15
2 files changed, 52 insertions, 1 deletions
diff --git a/manifests/mlmmj.pp b/manifests/mlmmj.pp
new file mode 100644
index 0000000..f07c860
--- /dev/null
+++ b/manifests/mlmmj.pp
@@ -0,0 +1,38 @@
+class mail::mlmmj {
+ include mail::packages::mlmmj
+
+ group { 'mlmmj':
+ ensure => present,
+ }
+
+ user { 'mlmmj':
+ ensure => present,
+ gid => 'mlmmj',
+ require => Group['mlmmj'],
+ }
+
+ file { '/var/spool/mlmmj':
+ ensure => directory,
+ owner => mlmmj,
+ group => mlmmj,
+ mode => 0750,
+ require => User['mlmmj'],
+ }
+
+ #cron { 'mlmmj-maintd':
+ # command => '/usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj',
+ # user => mlmmj,
+ # hour => "*",
+ # minute => "*/2",
+ # ensure => present,
+ # require => User['mlmmj'],
+ #}
+
+ postfix::transport_regexp { 'mlmmj_transport_regexp':
+ content => template('mail/postfix/mlmmj/transport_regexp.erb'),
+ }
+
+ postfix::virtual_regexp { 'mlmmj_virtual_regexp':
+ content => template('mail/postfix/mlmmj/virtual_regexp.erb'),
+ }
+}
diff --git a/manifests/system.pp b/manifests/system.pp
index b0926f5..217e5c3 100644
--- a/manifests/system.pp
+++ b/manifests/system.pp
@@ -4,6 +4,7 @@ class mail::system {
$postfix_use_dovecot_lda = "yes"
$postfix_use_schleuder = "yes"
$postfix_use_sympa = "yes"
+ $postfix_use_mlmmj = "yes"
$postfix_anon_sasl = "yes"
$postfix_manage_transport_regexp = "yes"
$postfix_manage_virtual_regexp = "yes"
@@ -65,8 +66,20 @@ class mail::system {
}
}
+ # Mlmmj
+ case $mail_mlmmj {
+ true: {
+ case $mlmmj_subdomain {
+ '': { $mlmmj_subdomain = "mlmmj" }
+ }
+
+ $mlmmj_relay_domains = ", ${mlmmj_subdomain}.${domain}"
+ include mail::mlmmj
+ }
+ }
+
case $postfix_relay_domains {
- '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}" }
+ '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}${mlmmj_relay_domains}" }
}
# Include base configuration