class nodo::mail {
# Class for mail nodes
$mail_delivery = "postfix"
- $postfix_relayhost = "$domain"
$postfix_smtp_listen = "$ipaddress"
$postfix_mydestination = '$myhostname, $mydomain, localhost.$mydomain, localhost'
include nodo::vserver
- include postfix::mta
+ include postfix
include database
include ssl::mail
}
# Postfix configuration
- postfix::config { "myhostname": value => "$fqdn" }
- postfix::config { "mailbox_command": value => '/usr/bin/maildrop -d ${USER}' }
+ postfix::config {
+ "mydomain": value => "$domain";
+ "myhostname": value => "$fqdn";
+ "mydestination": value => $postfix_mydestination;
+ "mynetworks": value => "127.0.0.0/8";
+ "virtual_alias_maps": value => "hash:/etc/postfix/virtual";
+ "transport_maps": value => "hash:/etc/postfix/transport";
+ "mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
+ }
+
+ postfix::hash { "/etc/postfix/virtual":
+ ensure => present,
+ }
+
+ postfix::hash { "/etc/postfix/transport":
+ ensure => present,
+ }
# SASL
postfix::config { "smtpd_sasl_auth_enable": value => 'yes' }