diff --git a/postfix/manifests/init.pp b/postfix/manifests/init.pp index 8643ebf..892e625 100644 --- a/postfix/manifests/init.pp +++ b/postfix/manifests/init.pp @@ -1,5 +1,34 @@ # Install Postfix packages. # +# === Global variables +# +# $mail_domain: +# SMTP domain name. +# +# $mail_server: +# Optional smarthost used for sending mail. +# +# $postfix_hostname: +# Hostname of postfix server. Defaults to $fqdn. +# +# $postfix_interfaces: +# Interfaces to listen. Defaults to 'localhost'. +# +# $postfix_networks: +# Optional value for mynetworks variable. +# +# $postfix_home_mailbox: +# Optional value for home_mailbox variable. +# +# $postfix_rbl: +# List of RBL hosts to use. +# +# $postfix_key: +# Path to SSL private key. Defaults to puppet client key. +# +# $postfix_cert: +# Path to SSL certificate. Defaults to puppet client certificate. +# class postfix { include ssl diff --git a/postfix/templates/main.cf.erb b/postfix/templates/main.cf.erb index 8310ae6..4f0c6ac 100644 --- a/postfix/templates/main.cf.erb +++ b/postfix/templates/main.cf.erb @@ -270,6 +270,9 @@ mynetworks_style = subnet #mynetworks = 168.100.189.0/28, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table +<% if has_variable?("postfix_networks") -%> +mynetworks = <%= postfix_networks %> +<% end -%> # The relay_domains parameter restricts what destinations this system will # relay mail to. See the smtpd_recipient_restrictions description in @@ -429,7 +432,7 @@ alias_database = hash:/etc/aliases #home_mailbox = Mailbox #home_mailbox = Maildir/ <% if has_variable?("postfix_home_mailbox") -%> -home_mailbox <%= postfix_home_mailbox %> +home_mailbox = <%= postfix_home_mailbox %> <% end -%> # The mail_spool_directory parameter specifies the directory where