summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/amavisd.pp24
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/mail.pp3
-rw-r--r--manifests/postfixadmin.pp38
4 files changed, 47 insertions, 19 deletions
diff --git a/manifests/amavisd.pp b/manifests/amavisd.pp
new file mode 100644
index 0000000..1047fb0
--- /dev/null
+++ b/manifests/amavisd.pp
@@ -0,0 +1,24 @@
+class mail::amavisd {
+ # TODO: master.cf
+
+ service { "amavisd":
+ ensure => running,
+ require => Package['amavisd-new'],
+ }
+
+ service { "freshclam":
+ ensure => running,
+ require => Package['clamav-freshclam'],
+ }
+
+ file { "/etc/amavis/conf.d/15-content_filter_mode":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => "puppet://$server/modules/mail/amavisd/15-content_filter_mode",
+ notify => Service['amavisd'],
+ }
+
+ postfix::config { "content_filter": value => 'amavis:[127.0.0.1]:10024' }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 29bca6d..f4f98d6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -9,3 +9,4 @@ import "packages.pp"
import "postfixadmin"
import "sasl.pp"
import "tls.pp"
+import "amavisd.pp"
diff --git a/manifests/mail.pp b/manifests/mail.pp
index 0864b7c..7d70823 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -21,6 +21,7 @@ class mail {
#include mail::dovecot
#include mail::postfixadmin
#include mail::header_checks
+ #include mail::amavisd
# Postfix configuration
postfix::config {
@@ -29,9 +30,9 @@ class mail {
"mydestination": value => "$postfix_mydestination";
"mynetworks": value => "$postfix_mynetworks";
"relay_domains": value => "$domain";
- "virtual_alias_maps": value => "hash:/etc/postfix/virtual"; # TODO: use postfixadmin config instead
"transport_maps": value => "hash:/etc/postfix/transport";
"mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
+ "mailbox_command": value => '/var/mail/virtual';
}
postfix::hash { "/etc/postfix/virtual":
diff --git a/manifests/postfixadmin.pp b/manifests/postfixadmin.pp
index f265385..e400eba 100644
--- a/manifests/postfixadmin.pp
+++ b/manifests/postfixadmin.pp
@@ -43,18 +43,6 @@ class mail::postfixadmin {
'/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf' ],
}
- # Additional for quota support
- postfix::config { "virtual_mailbox_limit_maps":
- value => 'mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf'
- require => File['/etc/postfix/mysql_virtual_mailbox_limit_maps.cf'],
- }
-
- postfix::config { "virtual_create_maildirsize": value => 'yes' }
- postfix::config { "virtual_mailbox_extended ": value => 'yes' }
- postfix::config { "virtual_mailbox_limit_override": value => 'yes' }
- postfix::config { "virtual_maildir_limit_message": value => 'The user's maildir has overdrawn his quota, try again later.' }
- postfix::config { "virtual_overquota_bounce": value => 'yes' }
-
#
# Map files
#
@@ -100,10 +88,24 @@ class mail::postfixadmin {
content => template('postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf'),
}
- file { "/etc/postfix/mysql_virtual_mailbox_limit_maps.cf":
- ensure => present,
- owner => root,
- mode => 0600,
- content => template('postfix/sql/mysql_virtual_mailbox_limit_maps.cf'),
- }
+ #
+ # Additional for quota support
+ #
+ #postfix::config { "virtual_mailbox_limit_maps":
+ # value => 'mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf'
+ # require => File['/etc/postfix/mysql_virtual_mailbox_limit_maps.cf'],
+ #}
+ #
+ #postfix::config { "virtual_create_maildirsize": value => 'yes' }
+ #postfix::config { "virtual_mailbox_extended ": value => 'yes' }
+ #postfix::config { "virtual_mailbox_limit_override": value => 'yes' }
+ #postfix::config { "virtual_maildir_limit_message": value => 'The user's maildir has overdrawn his quota, try again later.' }
+ #postfix::config { "virtual_overquota_bounce": value => 'yes' }
+ #
+ #file { "/etc/postfix/mysql_virtual_mailbox_limit_maps.cf":
+ # ensure => present,
+ # owner => root,
+ # mode => 0600,
+ # content => template('postfix/sql/mysql_virtual_mailbox_limit_maps.cf'),
+ #}
}