blob: 473a1f6323e2d7a316b2478e52e6b65a63d153a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
class mail {
$postfix_smtp_listen = "all"
$postfix_use_amavisd = "yes"
$postfix_mydestination = '$myhostname, $mydomain, localhost.$mydomain, localhost'
case $postfix_mynetworks {
'': { $postfix_mynetworks = "127.0.0.0/8" }
}
# Module requirements
include postfix
include database
include ssl::mail
# Subsystems
include mail::packages
include mail::sasl
include mail::tls
# TODO
#include mail::dovecot
#include mail::postfixadmin
#include mail::header_checks
#include mail::amavisd
# Postfix configuration
postfix::config {
"mydomain": value => "$domain";
"myhostname": value => "$fqdn";
"mydestination": value => "$postfix_mydestination";
"mynetworks": value => "$postfix_mynetworks";
"relay_domains": value => "$domain";
"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":
ensure => present,
}
postfix::hash { "/etc/postfix/transport":
ensure => present,
}
# Recipient restrictions
postfix::config { "smtpd_recipient_restrictions":
value => 'permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client psbl.surriel.com, check_policy_service inet:127.0.0.1:60000' }
}
|