Commit faae1c71 authored by Marc Fournier's avatar Marc Fournier
Browse files

Merge remote branch 'sarava/master'

parents 32993e2a 328c20af
......@@ -86,6 +86,7 @@ class postfix {
file { "/etc/postfix/master.cf":
ensure => present,
owner => "root",
group => "root",
mode => "0644",
content => $operatingsystem ? {
Redhat => template("postfix/master.cf.redhat.erb"),
......@@ -103,8 +104,9 @@ class postfix {
file { "/etc/postfix/main.cf":
ensure => present,
owner => "root",
group => "root",
mode => "0644",
source => "puppet:///postfix/main.cf",
source => "puppet:///modules/postfix/main.cf",
replace => false,
seltype => $postfix_seltype,
notify => Service["postfix"],
......
......@@ -5,11 +5,10 @@ Creates postfix hashed "map" files. It will create "${name}", and then build
"${name}.db" using the "postmap" command. The map file can then be referred to
using postfix::config.
Note: the content of the file is not managed by this definition.
Parameters:
- *name*: the name of the map file.
- *ensure*: present/absent, defaults to present
- *ensure*: present/absent, defaults to present.
- *source*: file source.
Requires:
- Class["postfix"]
......@@ -29,7 +28,7 @@ Example usage:
}
*/
define postfix::hash ($ensure="present") {
define postfix::hash ($ensure="present", $source = false) {
# selinux labels differ from one distribution to another
case $operatingsystem {
......@@ -47,11 +46,28 @@ define postfix::hash ($ensure="present") {
}
}
file {"${name}":
ensure => $ensure,
mode => 600,
seltype => $postfix_seltype,
require => Package["postfix"],
case $source {
false: {
file {"${name}":
ensure => $ensure,
mode => 600,
owner => root,
group => root,
seltype => $postfix_seltype,
require => Package["postfix"],
}
}
default: {
file {"${name}":
ensure => $ensure,
mode => 600,
owner => root,
group => root,
source => $source,
seltype => $postfix_seltype,
require => Package["postfix"],
}
}
}
file {"${name}.db":
......
......@@ -7,7 +7,8 @@
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
<%= postfix_smtp_listen %>:smtp inet n - - - - smtpd
<% if postfix_smtp_listen == 'all' %>smtp inet n - - - - smtpd
<% else %><%= postfix_smtp_listen %>:smtp inet n - - - - smtpd<% end %>
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
......@@ -74,4 +75,36 @@ scalemail-backend unix - n n - 2 pipe
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
<% if postfix_use_amavisd == 'yes' %>
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1
<% end %>
<% if postfix_use_dovecot_lda == 'yes' %>
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
<% end %>
<% if postfix_use_schleuder == 'yes' %>
schleuder unix - n n - - pipe
flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}
<% end %>
<% if postfix_use_sympa == 'yes' %>
sympa unix - n n - - pipe
flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}
sympabounce unix - n n - - pipe
flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}
<% end %>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment